Slicer  4.8
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
vtkMRMLPlotChartNode.h
Go to the documentation of this file.
1 /*==============================================================================
2 
3  Copyright (c) Kapteyn Astronomical Institute
4  University of Groningen, Groningen, Netherlands. All Rights Reserved.
5 
6  See COPYRIGHT.txt
7  or http://www.slicer.org/copyright/copyright.txt for details.
8 
9  Unless required by applicable law or agreed to in writing, software
10  distributed under the License is distributed on an "AS IS" BASIS,
11  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  See the License for the specific language governing permissions and
13  limitations under the License.
14 
15  This file was originally developed by Davide Punzo, Kapteyn Astronomical Institute,
16  and was supported through the European Research Council grant nr. 291531.
17 
18 ==============================================================================*/
19 
20 #ifndef __vtkMRMLPlotChartNode_h
21 #define __vtkMRMLPlotChartNode_h
22 
23 #include "vtkMRMLNode.h"
24 
25 class vtkCollection;
26 class vtkDataObject;
28 class vtkStringArray;
29 
30 #include <string>
31 
33 class VTK_MRML_EXPORT vtkMRMLPlotChartNode : public vtkMRMLNode
34 {
35  public:
36  //----------------------------------------------------------------
38  //----------------------------------------------------------------
39 
40  static vtkMRMLPlotChartNode *New();
42 
43  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
44 
45  virtual vtkMRMLNode* CreateNodeInstance() VTK_OVERRIDE;
46 
49  virtual void ReadXMLAttributes( const char** atts) VTK_OVERRIDE;
50 
53  virtual void WriteXML(ostream& of, int indent) VTK_OVERRIDE;
54 
57  virtual void Copy(vtkMRMLNode *node) VTK_OVERRIDE;
58 
61  virtual const char* GetNodeTagName() VTK_OVERRIDE {return "PlotChart";};
62 
65  virtual void ProcessMRMLEvents(vtkObject *caller,
66  unsigned long event,
67  void *callData) VTK_OVERRIDE;
68 
77  enum
78  {
79  PlotModifiedEvent = 17000,
80  };
81 
82  //----------------------------------------------------------------
84  //----------------------------------------------------------------
85 
89  void SetAndObservePlotDataNodeID(const char *plotDataNodeID);
90 
94  void AddAndObservePlotDataNodeID(const char *plotDataNodeID);
95 
99  void RemovePlotDataNodeID(const char *plotDataNodeID);
100 
104  void RemoveNthPlotDataNodeID(int n);
105 
108  void RemoveAllPlotDataNodeIDs();
109 
124  void SetAndObserveNthPlotDataNodeID(int n, const char *plotDataNodeID);
125 
128  bool HasPlotDataNodeID(const char* plotDataNodeID);
129 
133  int GetNumberOfPlotDataNodes();
134 
140  const char *GetNthPlotDataNodeID(int n);
141 
145  int GetNthPlotIndexFromID(const char* plotDataNodeID);
146 
150  vtkIdType GetColorPlotIndexFromID(const char* plotDataNodeID);
151 
155  const char *GetPlotDataNodeID();
156 
167  vtkMRMLPlotDataNode* GetNthPlotDataNode(int n);
168 
172  vtkMRMLPlotDataNode* GetPlotDataNode();
173 
176  virtual int GetPlotNames(std::vector<std::string> &plotDataNodeNames);
177 
180  virtual int GetPlotIDs(std::vector<std::string> &plotDataNodeIDs);
181 
213 
214  virtual const char* GetPlotDataNodeReferenceRole();
215 
216  protected:
217  //----------------------------------------------------------------
219  //----------------------------------------------------------------
223  void operator=(const vtkMRMLPlotChartNode&);
224 
225  static const char* PlotDataNodeReferenceRole;
227 
228  virtual const char* GetPlotDataNodeReferenceMRMLAttributeName();
229 
232  virtual void OnNodeReferenceAdded(vtkMRMLNodeReference *reference) VTK_OVERRIDE;
233 
236  virtual void OnNodeReferenceModified(vtkMRMLNodeReference *reference) VTK_OVERRIDE;
237 
240  virtual void OnNodeReferenceRemoved(vtkMRMLNodeReference *reference) VTK_OVERRIDE;
241 };
242 
243 #endif
static const char * PlotDataNodeReferenceMRMLAttributeName
MRML node for referencing a collection of data to plot.
void operator=(const vtkMRMLNode &)
virtual vtkMRMLNode * CreateNodeInstance()=0
Create instance of the default node. Like New only virtual.
virtual void OnNodeReferenceModified(vtkMRMLNodeReference *reference)
Called when a referenced node pointer is modified.
Definition: vtkMRMLNode.h:853
virtual void ProcessMRMLEvents(vtkObject *caller, unsigned long event, void *callData)
Propagate events generated in mrml.
virtual void OnNodeReferenceRemoved(vtkMRMLNodeReference *reference)
Called when a referenced node pointer is removed (set to NULL).
Definition: vtkMRMLNode.h:859
static const char * PlotDataNodeReferenceRole
MRML node to represent a vtkPlot object.
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
virtual void OnNodeReferenceAdded(vtkMRMLNodeReference *reference)
Definition: vtkMRMLNode.h:847
Abstract Superclass for all specific types of MRML nodes.
Definition: vtkMRMLNode.h:135
Class to hold information about a node reference.
Definition: vtkMRMLNode.h:723