Slicer  4.11
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
qSlicerSceneWriter.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 __qSlicerSceneWriter_h
22 #define __qSlicerSceneWriter_h
23 
24 // QtCore includes
25 #include "qSlicerFileWriter.h"
26 
27 // Data includes
28 #include "qSlicerDataModuleExport.h"
29 
30 class Q_SLICER_QTMODULES_DATA_EXPORT qSlicerSceneWriter
31  : public qSlicerFileWriter
32 {
33  Q_OBJECT
34 public:
36  qSlicerSceneWriter(QObject* parent = nullptr);
37  ~qSlicerSceneWriter() override;
38 
39  QString description()const override;
40  IOFileType fileType()const override;
41 
43  bool canWriteObject(vtkObject* object)const override;
44 
48  QStringList extensions(vtkObject* object)const override;
49 
52  bool write(const qSlicerIO::IOProperties& properties) override;
53 
54 protected:
55  bool writeToMRML(const qSlicerIO::IOProperties& properties);
56  bool writeToMRB(const qSlicerIO::IOProperties& properties);
57  bool writeToDirectory(const qSlicerIO::IOProperties& properties);
58 
59 private:
60  Q_DISABLE_COPY(qSlicerSceneWriter);
61 };
62 
63 #endif
virtual QStringList extensions(vtkObject *object) const =0
qSlicerFileWriter Superclass
virtual QString description() const =0
Unique name of the reader/writer.
virtual bool write(const qSlicerIO::IOProperties &properties)
virtual IOFileType fileType() const =0
Multiple readers can share the same file type.
QString IOFileType
Definition: qSlicerIO.h:52
virtual bool canWriteObject(vtkObject *object) const
Return true if the object is handled by the writer.