Slicer 5.13
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
Loading...
Searching...
No Matches
vtkMRMLNodeWriter.h
Go to the documentation of this file.
1/*==============================================================================
2
3 Program: 3D Slicer
4
5 Copyright (c) Kitware Inc.
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 __vtkMRMLNodeWriter_h
19#define __vtkMRMLNodeWriter_h
20
21#include "vtkMRMLFileWriter.h"
22
23// VTK includes
24#include <vtkSmartPointer.h>
25
26class vtkMRMLNode;
28
32class VTK_MRML_LOGIC_EXPORT vtkMRMLNodeWriter : public vtkMRMLFileWriter
33{
34public:
37 void PrintSelf(ostream& os, vtkIndent indent) override;
38
42 static vtkSmartPointer<vtkMRMLNodeWriter> CreateNodeWriter(const std::string& description,
43 const std::string& fileType,
44 const std::vector<std::string>& nodeClassNames,
45 bool supportUseCompression = true);
46
48 vtkGetMacro(SupportUseCompression, bool);
49 vtkSetMacro(SupportUseCompression, bool);
50 vtkBooleanMacro(SupportUseCompression, bool);
51
53 bool CanWriteObject(vtkObject* object) override;
54
57 std::vector<std::string> GetNameFiltersForObject(vtkObject* object) override;
58
63 bool Write(vtkMRMLIOProperties* properties) override;
64
72
76
78 virtual vtkMRMLNode* GetNodeByID(const std::string& id);
79
80protected:
83
85
86private:
87 vtkMRMLNodeWriter(const vtkMRMLNodeWriter&) = delete;
88 void operator=(const vtkMRMLNodeWriter&) = delete;
89};
90
91#endif
std::vector< std::string > GetNameFiltersForObject(vtkObject *object) override
void GetOptionsDescription(vtkMRMLIOOptionsDescription *description) override
static vtkMRMLNodeWriter * New()
~vtkMRMLNodeWriter() override
virtual vtkMRMLNode * GetNodeByID(const std::string &id)
Get node from the scene by node ID.
bool Write(vtkMRMLIOProperties *properties) override
bool WriteNode(vtkMRMLStorableNode *node, vtkMRMLIOProperties *properties)
bool CanWriteObject(vtkObject *object) override
Return true if the object is a storable node of any of the node class names.
void PrintSelf(ostream &os, vtkIndent indent) override
static vtkSmartPointer< vtkMRMLNodeWriter > CreateNodeWriter(const std::string &description, const std::string &fileType, const std::vector< std::string > &nodeClassNames, bool supportUseCompression=true)
Abstract Superclass for all specific types of MRML nodes.
MRML node to represent a 3D surface model.