Slicer  4.10
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  };
65 
67  vtkSetClampMacro(CoordinateSystem, int, vtkMRMLMarkupsStorageNode::RAS, vtkMRMLMarkupsStorageNode::LPS);
68  vtkGetMacro(CoordinateSystem, int);
69  std::string GetCoordinateSystemAsString();
72  void UseRASOn();
73  bool GetUseRAS();
74  void UseLPSOn();
75  bool GetUseLPS();
76 
82  std::string ConvertStringToStorageFormat(std::string input);
83  std::string ConvertStringFromStorageFormat(std::string input);
84 
85 protected:
90 
92  virtual void InitializeSupportedReadFileTypes() VTK_OVERRIDE;
93 
95  virtual void InitializeSupportedWriteFileTypes() VTK_OVERRIDE;
96 
99  virtual int ReadDataInternal(vtkMRMLNode *refNode) VTK_OVERRIDE;
100 
104  virtual int WriteDataInternal(vtkMRMLNode *refNode) VTK_OVERRIDE;
105 
111  std::string GetFirstQuotedString(std::string inputString, size_t *endCommaPos);
112 
113 private:
114 
119  int CoordinateSystem;
120 };
121 
122 #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 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
virtual bool CanReadInReferenceNode(vtkMRMLNode *refNode)=0