Slicer  4.11
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
vtkMRMLDoubleArrayNode.h
Go to the documentation of this file.
1 /*=auto=========================================================================
2 
3  Portions (c) Copyright 2009 Brigham and Women's Hospital (BWH) All Rights Reserved.
4 
5  See COPYRIGHT.txt
6  or http://www.slicer.org/copyright/copyright.txt for details.
7 
8  Program: 3D Slicer
9  Module: $RCSfile: vtkMRMLCurveAnalysisNode.h,v $
10  Date: $Date: 2006/03/19 17:12:29 $
11  Version: $Revision: 1.3 $
12 
13 =========================================================================auto=*/
14 
15 #ifndef __vtkMRMLDoubleArrayNode_h
16 #define __vtkMRMLDoubleArrayNode_h
17 
18 #include <string>
19 #include <vector>
20 
21 #include "vtkMRMLStorableNode.h"
22 class vtkDoubleArray;
23 class vtkMRMLStorageNode;
24 
25 class VTK_MRML_EXPORT vtkMRMLDoubleArrayNode : public vtkMRMLStorableNode
26 {
27 public:
28  //----------------------------------------------------------------
30  //----------------------------------------------------------------
31 
33  enum {
34  INTERP_LINEAR = 0
35  };
36 
37  //----------------------------------------------------------------
39  //----------------------------------------------------------------
40 
41  static vtkMRMLDoubleArrayNode *New();
43 
44  void PrintSelf(ostream& os, vtkIndent indent) override;
45 
46  vtkMRMLNode* CreateNodeInstance() override;
47 
50  void ReadXMLAttributes( const char** atts) override;
51 
54  void WriteXML(ostream& of, int indent) override;
55 
59 
62  const char* GetNodeTagName() override
63  {return "DoubleArray";}
64 
67  void ProcessMRMLEvents ( vtkObject *caller, unsigned long event, void *callData ) override;
68 
69  //----------------------------------------------------------------
71  //----------------------------------------------------------------
72  virtual void SetArray(vtkDoubleArray*);
73  vtkGetObjectMacro ( Array, vtkDoubleArray );
74 
75  //----------------------------------------------------------------
77  //----------------------------------------------------------------
78 
81  void SetSize(unsigned int n);
82 
85  unsigned int GetSize();
86 
91  double GetYAxisValue(double x, int interp=INTERP_LINEAR);
92 
96 
101 
104  int SetValues(int index, double* values);
105 
108  int SetValue(int index, int component, double value);
109 
112  int SetXYValue(int index, double x, double y);
113 
117  int SetXYValue(int index, double x, double y, double yerr);
118 
121  int GetValues(int index, double* values);
122 
125  double GetValue(int index, int component, int& success);
126 
129  int GetXYValue(int index, double* x, double* y);
130 
134  int GetXYValue(int index, double* x, double* y, double* yerr);
135 
138  int AddValues(double* values);
139 
142  int AddValue(int component, double value);
143 
146  int AddXYValue(double x, double y);
147 
151  int AddXYValue(double x, double y, double yerr);
152 
157  void GetRange(double* rangeX, double* rangeY, int fIncludeError=1);
158 
162  void GetXRange(double* range);
163 
168  void GetYRange(double* range, int fIncludeError=1);
169 
170  // Description:
171  //Set labels
172  //void SetLabel(std::vector< std::string > labels);
173  typedef std::vector< std::string > LabelsVectorType;
174  void SetLabels(const LabelsVectorType &labels);
175 
176  // Description:
177  //Get labels
178  const LabelsVectorType & GetLabels() const;
179 
183 
184  //----------------------------------------------------------------
186  //----------------------------------------------------------------
187  protected:
189  ~vtkMRMLDoubleArrayNode() override;
191  void operator=(const vtkMRMLDoubleArrayNode&);
192 
193 
194  protected:
195  //----------------------------------------------------------------
197  //----------------------------------------------------------------
198 
199  vtkDoubleArray* Array;
200 
201  std::vector< std::string > Unit;
202  std::vector< std::string > Labels;
203 
204 
205 };
206 
207 #endif
208 
virtual vtkMRMLStorageNode * CreateDefaultStorageNode()
void ReadXMLAttributes(const char **atts) override
Read node attributes from XML file
vtkMRMLNode * CreateNodeInstance() override=0
MRMLNode methods.
std::vector< std::string > LabelsVectorType
MRML node to represent a 3D surface model.
std::vector< std::string > Unit
A superclass for other storage nodes.
void ProcessMRMLEvents(vtkObject *, unsigned long, void *) override
alternative method to propagate events generated in Storage nodes
vtkMRMLCopyContentMacro(vtkMRMLStorableNode)
const char * GetNodeTagName() override
Get node XML tag name (like Volume, Model)
std::vector< std::string > Labels
Abstract Superclass for all specific types of MRML nodes.
Definition: vtkMRMLNode.h:167
void operator=(const vtkMRMLStorableNode &)
void WriteXML(ostream &of, int indent) override
Write this node&#39;s information to a MRML file in XML format.
void PrintSelf(ostream &os, vtkIndent indent) override
vtkDoubleArray * Array
Data.