Slicer  4.10
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
vtkMRMLMarkupsFiducialNode.h
Go to the documentation of this file.
1 /*==============================================================================
2 
3  Program: 3D Slicer
4 
5  Portions (c) Copyright Brigham and Women's Hospital (BWH) All Rights Reserved.
6 
7  See COPYRIGHT.txt
8  or http://www.slicer.org/copyright/copyright.txt for details.
9 
10  Unless required by applicable law or agreed to in writing, software
11  distributed under the License is distributed on an "AS IS" BASIS,
12  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  See the License for the specific language governing permissions and
14  limitations under the License.
15 
16 ==============================================================================*/
17 
18 #ifndef __vtkMRMLMarkupsFiducialNode_h
19 #define __vtkMRMLMarkupsFiducialNode_h
20 
21 // MRML includes
22 #include "vtkMRMLDisplayableNode.h"
23 
24 // Markups includes
25 #include "vtkSlicerMarkupsModuleMRMLExport.h"
27 #include "vtkMRMLMarkupsNode.h"
28 
29 // VTK includes
30 #include <vtkSmartPointer.h>
31 
43 class VTK_SLICER_MARKUPS_MODULE_MRML_EXPORT vtkMRMLMarkupsFiducialNode : public vtkMRMLMarkupsNode
44 {
45 public:
49  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
50 
51  virtual const char* GetIcon() VTK_OVERRIDE {return ":/Icons/MarkupsMouseModePlace.png";}
52 
53  //--------------------------------------------------------------------------
54  // MRMLNode methods
55  //--------------------------------------------------------------------------
56 
57  virtual vtkMRMLNode* CreateNodeInstance() VTK_OVERRIDE;
59  virtual const char* GetNodeTagName() VTK_OVERRIDE {return "MarkupsFiducial";}
60 
62  virtual void ReadXMLAttributes( const char** atts) VTK_OVERRIDE;
63 
65  virtual void WriteXML(ostream& of, int indent) VTK_OVERRIDE;
66 
68  virtual void Copy(vtkMRMLNode *node) VTK_OVERRIDE;
69 
71  void UpdateScene(vtkMRMLScene *scene) VTK_OVERRIDE;
72 
74  virtual void ProcessMRMLEvents ( vtkObject * /*caller*/,
75  unsigned long /*event*/,
76  void * /*callData*/ ) VTK_OVERRIDE;
77 
78 
80  virtual vtkMRMLStorageNode* CreateDefaultStorageNode() VTK_OVERRIDE;
81 
83  virtual void CreateDefaultDisplayNodes() VTK_OVERRIDE;
84 
86  vtkMRMLMarkupsDisplayNode *GetMarkupsDisplayNode();
87 
88  // Wrapping some of the generic markup methods
89 
91  int GetNumberOfFiducials() { return this->GetNumberOfMarkups(); } ;
93  int AddFiducial(double x, double y, double z);
94  int AddFiducial(double x, double y, double z, std::string label);
96  int AddFiducialFromArray(double pos[3], std::string label = std::string());
98  void GetNthFiducialPosition(int n, double pos[3]);
100  void SetNthFiducialPosition(int n, double x, double y, double z);
102  void SetNthFiducialPositionFromArray(int n, double pos[3]);
104  bool GetNthFiducialSelected(int n = 0);
106  void SetNthFiducialSelected(int n, bool flag);
108  bool GetNthFiducialVisibility(int n = 0);
116  void SetNthFiducialVisibility(int n, bool flag);
118  std::string GetNthFiducialLabel(int n = 0);
120  void SetNthFiducialLabel(int n, std::string label);
122  std::string GetNthFiducialAssociatedNodeID(int n = 0);
124  void SetNthFiducialAssociatedNodeID(int n, const char* id);
126  void SetNthFiducialWorldCoordinates(int n, double coords[4]);
128  void GetNthFiducialWorldCoordinates(int n, double coords[4]);
129 
130  virtual void GetRASBounds(double bounds[6]) VTK_OVERRIDE;
131  virtual void GetBounds(double bounds[6]) VTK_OVERRIDE;
132 
133 protected:
138 
139 };
140 
141 #endif
static vtkMRMLMarkupsNode * New()
virtual void WriteXML(ostream &of, int indent) VTK_OVERRIDE
Write this node&#39;s information to a MRML file in XML format.
virtual const char * GetIcon() VTK_OVERRIDE
virtual void ProcessMRMLEvents(vtkObject *, unsigned long, void *) VTK_OVERRIDE
Alternative method to propagate events generated in Display nodes.
MRML node to represent a fiducial markup Fiducial Markups nodes contain a list of fiducial points...
virtual void GetBounds(double bounds[6])
void operator=(const vtkMRMLMarkupsNode &)
void UpdateScene(vtkMRMLScene *scene) VTK_OVERRIDE
Currently only calls superclass UpdateScene.
int GetNumberOfMarkups()
Return the number of markups that are stored in this node.
virtual void ReadXMLAttributes(const char **atts) VTK_OVERRIDE
Read node attributes from XML file.
MRML node to represent a list of markups Markups nodes contains a list of markups that each contain a...
A set of MRML Nodes that supports serialization and undo/redo.
Definition: vtkMRMLScene.h:54
A superclass for other storage nodes.
virtual vtkMRMLStorageNode * CreateDefaultStorageNode() VTK_OVERRIDE
Create default storage node or NULL if does not have one.
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
virtual vtkMRMLNode * CreateNodeInstance() VTK_OVERRIDE
MRMLNode methods.
virtual void Copy(vtkMRMLNode *node) VTK_OVERRIDE
Copy the node&#39;s attributes to this object.
Abstract Superclass for all specific types of MRML nodes.
Definition: vtkMRMLNode.h:138
virtual void GetRASBounds(double bounds[6])