Slicer 5.9
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
qSlicerNodeWriter.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 This file was originally developed by Julien Finet, Kitware Inc.
17 and was partially funded by NIH grant 3P41RR013218-12S1
18
19==============================================================================*/
20
21#ifndef __qSlicerNodeWriter_h
22#define __qSlicerNodeWriter_h
23
24// QtCore includes
25#include "qSlicerBaseQTGUIExport.h"
26#include "qSlicerFileWriter.h"
27class qSlicerNodeWriterPrivate;
28class vtkMRMLNode;
29
31class Q_SLICER_BASE_QTGUI_EXPORT qSlicerNodeWriter
32 : public qSlicerFileWriter
33{
34 Q_OBJECT
37public:
41 const QStringList& nodeTags,
42 bool useCompression,
43 QObject* parent);
44
46
47 void setSupportUseCompression(bool useCompression);
49
50 QString description()const override;
51 IOFileType fileType()const override;
52
54 bool canWriteObject(vtkObject* object)const override;
55
59 QStringList extensions(vtkObject* object)const override;
60
65 bool write(const qSlicerIO::IOProperties& properties) override;
66
67 virtual vtkMRMLNode* getNodeByID(const char *id)const;
68
70 qSlicerIOOptions* options()const override;
71
72protected:
73 void setNodeClassNames(const QStringList& nodeClassNames);
74 QStringList nodeClassNames()const;
75
76protected:
77 QScopedPointer<qSlicerNodeWriterPrivate> d_ptr;
78
79private:
80 Q_DECLARE_PRIVATE(qSlicerNodeWriter);
81 Q_DISABLE_COPY(qSlicerNodeWriter);
82};
83
84#endif
qSlicerFileWriter(QObject *parent=nullptr)
QString IOFileType
Definition qSlicerIO.h:52
QVariantMap IOProperties
Definition qSlicerIO.h:53
QString description() const override
Unique name of the reader/writer.
bool canWriteObject(vtkObject *object) const override
Return true if this class can write the input object.
void setSupportUseCompression(bool useCompression)
IOFileType fileType() const override
Multiple readers can share the same file type.
virtual vtkMRMLNode * getNodeByID(const char *id) const
QStringList extensions(vtkObject *object) const override
bool write(const qSlicerIO::IOProperties &properties) override
bool supportUseCompression() const
qSlicerFileWriter Superclass
bool supportUseCompression
Some storage nodes don't support the compression option.
~qSlicerNodeWriter() override
qSlicerNodeWriter(const QString &description, const qSlicerIO::IOFileType &fileType, const QStringList &nodeTags, bool useCompression, QObject *parent)
QStringList nodeClassNames() const
QScopedPointer< qSlicerNodeWriterPrivate > d_ptr
qSlicerIOOptions * options() const override
Return a qSlicerNodeWriterOptionsWidget.
void setNodeClassNames(const QStringList &nodeClassNames)
Abstract Superclass for all specific types of MRML nodes.