Slicer  5.0
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
vtkMRMLMarkupsJsonStorageNode.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 
22 
23 #ifndef __vtkMRMLMarkupsJsonStorageNode_h
24 #define __vtkMRMLMarkupsJsonStorageNode_h
25 
26 // Markups includes
27 #include "vtkSlicerMarkupsModuleMRMLExport.h"
29 
30 class vtkMRMLMarkupsNode;
32 
34 class VTK_SLICER_MARKUPS_MODULE_MRML_EXPORT vtkMRMLMarkupsJsonStorageNode : public vtkMRMLMarkupsStorageNode
35 {
36 public:
37  static vtkMRMLMarkupsJsonStorageNode *New();
39  void PrintSelf(ostream& os, vtkIndent indent) override;
40 
41  vtkMRMLNode* CreateNodeInstance() override;
42 
44  vtkMRMLMarkupsNode* AddNewMarkupsNodeFromFile(const char* filePath, const char* nodeName=nullptr, int markupIndex=0);
45 
48  const char* GetNodeTagName() override {return "MarkupsJsonStorage";};
49 
51  void ReadXMLAttributes( const char** atts) override;
52 
54  void WriteXML(ostream& of, int indent) override;
55 
57  void Copy(vtkMRMLNode *node) override;
58 
59  bool CanReadInReferenceNode(vtkMRMLNode *refNode) override;
60 
63  void GetMarkupsTypesInFile(const char* filePath, std::vector<std::string>& outputMarkupsTypes);
64 
65 protected:
70 
72  void InitializeSupportedReadFileTypes() override;
73 
75  void InitializeSupportedWriteFileTypes() override;
76 
78  int ReadDataInternal(vtkMRMLNode *refNode) override;
79 
81  int WriteDataInternal(vtkMRMLNode *refNode) override;
82 
83  class vtkInternal;
84  vtkInternal* Internal;
85  friend class vtkInternal;
86 };
87 
88 #endif
vtkMRMLNode * CreateNodeInstance() override=0
Create instance of the default node. Like New only virtual.
bool CanReadInReferenceNode(vtkMRMLNode *refNode) override
virtual int ReadDataInternal(vtkMRMLNode *refNode)
void ReadXMLAttributes(const char **atts) override
Read node attributes from XML file.
void Copy(vtkMRMLNode *node) override
Copy the node&#39;s attributes to this object.
virtual void InitializeSupportedReadFileTypes()
virtual void InitializeSupportedWriteFileTypes()
const char * GetNodeTagName() override
Get node XML tag name (like Storage, Model)
void WriteXML(ostream &of, int indent) override
Write this node&#39;s information to a MRML file in XML format.
virtual int WriteDataInternal(vtkMRMLNode *refNode)
Abstract Superclass for all specific types of MRML nodes.
Definition: vtkMRMLNode.h:167
void PrintSelf(ostream &os, vtkIndent indent) override
void operator=(const vtkMRMLMarkupsStorageNode &)