Slicer  4.13
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) override;
41 
42  vtkMRMLNode* CreateNodeInstance() override;
43 
46  const char* GetNodeTagName() override {return "MarkupsStorage";};
47 
49  void ReadXMLAttributes( const char** atts) override;
50 
52  void WriteXML(ostream& of, int indent) override;
53 
55  void Copy(vtkMRMLNode *node) override;
56 
57  bool CanReadInReferenceNode(vtkMRMLNode *refNode) override;
58 
60  vtkSetClampMacro(CoordinateSystem, int, 0, vtkMRMLStorageNode::CoordinateSystemType_Last-1);
61  vtkGetMacro(CoordinateSystem, int);
62  std::string GetCoordinateSystemAsString();
63  static const char* GetCoordinateSystemAsString(int id);
64  static int GetCoordinateSystemFromString(const char* name);
67  void UseRASOn();
68  bool GetUseRAS();
69  void UseLPSOn();
70  bool GetUseLPS();
71 
77  std::string ConvertStringToStorageFormat(std::string input);
78  std::string ConvertStringFromStorageFormat(std::string input);
79 
80 protected:
82  ~vtkMRMLMarkupsStorageNode() override;
85 
87  void InitializeSupportedReadFileTypes() override;
88 
90  void InitializeSupportedWriteFileTypes() override;
91 
94  int ReadDataInternal(vtkMRMLNode *refNode) override;
95 
99  int WriteDataInternal(vtkMRMLNode *refNode) override;
100 
106  std::string GetFirstQuotedString(std::string inputString, size_t *endCommaPos);
107 
108 private:
109 
114  int CoordinateSystem;
115 };
116 
117 #endif
vtkMRMLNode * CreateNodeInstance() override=0
Create instance of the default node. Like New only virtual.
virtual int ReadDataInternal(vtkMRMLNode *refNode)
const char * GetNodeTagName() override
Get node XML tag name (like Storage, Model)
virtual void InitializeSupportedReadFileTypes()
void operator=(const vtkMRMLStorageNode &)
void ReadXMLAttributes(const char **atts) override
Read node attributes from XML file
void Copy(vtkMRMLNode *node) override
Copy the node's attributes to this object
void PrintSelf(ostream &os, vtkIndent indent) override
void WriteXML(ostream &of, int indent) override
Write this node's information to a MRML file in XML format.
A superclass for other storage nodes.
virtual void InitializeSupportedWriteFileTypes()
virtual int WriteDataInternal(vtkMRMLNode *refNode)
Abstract Superclass for all specific types of MRML nodes.
Definition: vtkMRMLNode.h:167
virtual bool CanReadInReferenceNode(vtkMRMLNode *refNode)=0