Slicer  4.8
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
vtkMRMLMarkupsStorageNode.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 
25 
26 #ifndef __vtkMRMLMarkupsStorageNode_h
27 #define __vtkMRMLMarkupsStorageNode_h
28 
29 // MRML includes
30 #include "vtkMRMLStorageNode.h"
31 
33 #define MARKUPS_BUFFER_SIZE 1024
34 
35 class VTK_MRML_EXPORT vtkMRMLMarkupsStorageNode : public vtkMRMLStorageNode
36 {
37 public:
38  static vtkMRMLMarkupsStorageNode *New();
40  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
41 
42  virtual vtkMRMLNode* CreateNodeInstance() VTK_OVERRIDE;
43 
46  virtual const char* GetNodeTagName() VTK_OVERRIDE {return "MarkupsStorage";};
47 
49  virtual void ReadXMLAttributes( const char** atts) VTK_OVERRIDE;
50 
52  virtual void WriteXML(ostream& of, int indent) VTK_OVERRIDE;
53 
55  virtual void Copy(vtkMRMLNode *node) VTK_OVERRIDE;
56 
57  virtual bool CanReadInReferenceNode(vtkMRMLNode *refNode) VTK_OVERRIDE;
58 
60  enum
61  {
62  RAS = 0,
63  LPS,
64  IJK
65  };
66 
68  vtkSetClampMacro(CoordinateSystem, int, vtkMRMLMarkupsStorageNode::RAS, vtkMRMLMarkupsStorageNode::IJK);
69  vtkGetMacro(CoordinateSystem, int);
70  std::string GetCoordinateSystemAsString();
73  void UseRASOn();
74  bool GetUseRAS();
75  void UseLPSOn();
76  bool GetUseLPS();
77  void UseIJKOn();
78  bool GetUseIJK();
79 
85  std::string ConvertStringToStorageFormat(std::string input);
86  std::string ConvertStringFromStorageFormat(std::string input);
87 
88 protected:
93 
95  virtual void InitializeSupportedReadFileTypes() VTK_OVERRIDE;
96 
98  virtual void InitializeSupportedWriteFileTypes() VTK_OVERRIDE;
99 
102  virtual int ReadDataInternal(vtkMRMLNode *refNode) VTK_OVERRIDE;
103 
107  virtual int WriteDataInternal(vtkMRMLNode *refNode) VTK_OVERRIDE;
108 
114  std::string GetFirstQuotedString(std::string inputString, size_t *endCommaPos);
115 
116 private:
117 
122  int CoordinateSystem;
123 };
124 
125 #endif
virtual void InitializeSupportedReadFileTypes()
LRU Cache.
virtual void ReadXMLAttributes(const char **atts) VTK_OVERRIDE
Read node attributes from XML file.
void operator=(const vtkMRMLStorageNode &)
virtual vtkMRMLNode * CreateNodeInstance() VTK_OVERRIDE=0
Create instance of the default node. Like New only virtual.
virtual void WriteXML(ostream &of, int indent) VTK_OVERRIDE
Write this node's information to a MRML file in XML format.
virtual void Copy(vtkMRMLNode *node) VTK_OVERRIDE
Copy the node's attributes to this object.
A supercalss for other storage nodes.
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
Abstract Superclass for all specific types of MRML nodes.
Definition: vtkMRMLNode.h:135
virtual bool CanReadInReferenceNode(vtkMRMLNode *refNode)=0