Slicer  5.0
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
qSlicerFileWriter.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 __qSlicerFileWriter_h
22 #define __qSlicerFileWriter_h
23 
24 // QtCore includes
25 #include "qSlicerIO.h"
26 class qSlicerFileWriterPrivate;
27 
28 class vtkObject;
29 
30 class Q_SLICER_BASE_QTCORE_EXPORT qSlicerFileWriter
31  : public qSlicerIO
32 {
33  Q_OBJECT
34 public:
35  qSlicerFileWriter(QObject* parent = nullptr);
36  ~qSlicerFileWriter() override;
37 
39  virtual bool canWriteObject(vtkObject* object)const;
40 
44  virtual QStringList extensions(vtkObject* object)const = 0;
45 
54  virtual bool write(const qSlicerIO::IOProperties& properties);
55 
59  virtual QStringList writtenNodes()const;
60 
61 protected:
62  virtual void setWrittenNodes(const QStringList& nodes);
63 
64 protected:
65  QScopedPointer<qSlicerFileWriterPrivate> d_ptr;
66 
67 private:
68  Q_DECLARE_PRIVATE(qSlicerFileWriter);
69  Q_DISABLE_COPY(qSlicerFileWriter);
70 };
71 
72 #endif
list extensions
Definition: conf.py:36
QScopedPointer< qSlicerFileWriterPrivate > d_ptr
Base class for qSlicerFileReader and qSlicerFileWriter.
Definition: qSlicerIO.h:41