Slicer  4.10
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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) VTK_OVERRIDE;
45 
46  virtual vtkMRMLNode* CreateNodeInstance() VTK_OVERRIDE;
47 
50  virtual void ReadXMLAttributes( const char** atts) VTK_OVERRIDE;
51 
54  virtual void WriteXML(ostream& of, int indent) VTK_OVERRIDE;
55 
58  virtual void Copy(vtkMRMLNode *node) VTK_OVERRIDE;
59 
62  virtual const char* GetNodeTagName() VTK_OVERRIDE
63  {return "DoubleArray";}
64 
67  virtual void ProcessMRMLEvents ( vtkObject *caller, unsigned long event, void *callData ) VTK_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 
182  virtual vtkMRMLStorageNode* CreateDefaultStorageNode() VTK_OVERRIDE;
183 
184  //----------------------------------------------------------------
186  //----------------------------------------------------------------
187  protected:
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()
LRU Cache.
virtual void ProcessMRMLEvents(vtkObject *, unsigned long, void *) VTK_OVERRIDE
alternative method to propagate events generated in Storage nodes
std::vector< std::string > LabelsVectorType
virtual vtkMRMLNode * CreateNodeInstance() VTK_OVERRIDE=0
MRMLNode methods.
MRML node to represent a 3D surface model.
A superclass for other storage nodes.
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
Abstract Superclass for all specific types of MRML nodes.
Definition: vtkMRMLNode.h:138