Slicer  4.11
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
vtkMRMLPlotViewNode.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 __vtkMRMLPlotViewNode_h
21 #define __vtkMRMLPlotViewNode_h
22 
24 
26 
30 class VTK_MRML_EXPORT vtkMRMLPlotViewNode : public vtkMRMLAbstractViewNode
31 {
32 public:
33  static vtkMRMLPlotViewNode *New();
35  void PrintSelf(ostream& os, vtkIndent indent) override;
36 
38  enum {
43  InteractionMode_Last // must be last
44  };
45 
46  //--------------------------------------------------------------------------
48  //--------------------------------------------------------------------------
49 
50  vtkMRMLNode* CreateNodeInstance() override;
51 
54  void ReadXMLAttributes( const char** atts) override;
55 
58  void WriteXML(ostream& of, int indent) override;
59 
62  void Copy(vtkMRMLNode *node) override;
63 
66  const char* GetNodeTagName() override { return "PlotView"; };
67 
70  virtual void SetPlotChartNodeID(const char *PlotChartNodeID);
71 
74  const char* GetPlotChartNodeID();
75 
78  vtkMRMLPlotChartNode* GetPlotChartNode();
79 
85  vtkSetMacro (DoPropagatePlotChartSelection, bool );
86  vtkGetMacro (DoPropagatePlotChartSelection, bool );
87 
93  vtkGetMacro(InteractionMode, int);
94  vtkSetMacro(InteractionMode, int);
95 
98  vtkBooleanMacro(EnablePointMoveAlongX, bool);
99  vtkGetMacro(EnablePointMoveAlongX, bool);
100  vtkSetMacro(EnablePointMoveAlongX, bool);
101 
104  vtkBooleanMacro(EnablePointMoveAlongY, bool);
105  vtkGetMacro(EnablePointMoveAlongY, bool);
106  vtkSetMacro(EnablePointMoveAlongY, bool);
107 
110  static const char *GetInteractionModeAsString(int id);
111  static int GetInteractionModeFromString(const char *name);
112 
115  void ProcessMRMLEvents(vtkObject *caller,
116  unsigned long event,
117  void *callData) override;
118 
127  enum
128  {
129  PlotChartNodeChangedEvent = 18000
130  };
131 
132  virtual const char* GetPlotChartNodeReferenceRole();
133 
134 protected:
136  ~vtkMRMLPlotViewNode() override;
138  void operator=(const vtkMRMLPlotViewNode&);
139 
140  virtual const char* GetPlotChartNodeReferenceMRMLAttributeName();
141 
142  static const char* PlotChartNodeReferenceRole;
144 
147  void OnNodeReferenceAdded(vtkMRMLNodeReference *reference) override;
148 
151  void OnNodeReferenceModified(vtkMRMLNodeReference *reference) override;
152 
155  void OnNodeReferenceRemoved(vtkMRMLNodeReference *reference) override;
156 
158 
162 };
163 
164 #endif
MRML node to represent Plot view parameters.
void Copy(vtkMRMLNode *node) override
Copy the node's attributes to this object.
const char * GetNodeTagName() override
Get node XML tag name (like Volume, Model).
MRML node for referencing a collection of data to plot.
static const char * PlotChartNodeReferenceRole
void operator=(const vtkMRMLAbstractViewNode &)
static const char * PlotChartNodeReferenceMRMLAttributeName
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:887
virtual void ProcessMRMLEvents(vtkObject *caller, unsigned long event, void *callData)
Propagate events generated in mrml.
Abstract MRML node to represent a view. The class holds the properties common to any view type (3D...
void ReadXMLAttributes(const char **atts) override
MRMLNode methods.
virtual void OnNodeReferenceRemoved(vtkMRMLNodeReference *reference)
Called when a referenced node pointer is removed (set to nullptr).
Definition: vtkMRMLNode.h:893
void PrintSelf(ostream &os, vtkIndent indent) override
virtual void OnNodeReferenceAdded(vtkMRMLNodeReference *reference)
Definition: vtkMRMLNode.h:881
Abstract Superclass for all specific types of MRML nodes.
Definition: vtkMRMLNode.h:139
Class to hold information about a node reference.
Definition: vtkMRMLNode.h:757
void WriteXML(ostream &of, int indent) override
Write this node's information to a MRML file in XML format.