Slicer  4.8
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
qSlicerFileReader.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 __qSlicerFileReader_h
22 #define __qSlicerFileReader_h
23 
24 // QtCore includes
25 #include "qSlicerIO.h"
26 #include "qSlicerBaseQTCoreExport.h"
27 
28 class qSlicerFileReaderOptions;
29 class qSlicerFileReaderPrivate;
30 
31 class Q_SLICER_BASE_QTCORE_EXPORT qSlicerFileReader
32  : public qSlicerIO
33 {
34  Q_OBJECT
35 public:
37  explicit qSlicerFileReader(QObject* parent = 0);
38  virtual ~qSlicerFileReader();
39 
43  virtual QStringList extensions()const;
44 
48  bool canLoadFile(const QString& file)const;
49 
57  QStringList supportedNameFilters(const QString& fileName, int* longestExtensionMatchPtr = NULL)const;
58 
60  virtual bool load(const IOProperties& properties);
61 
65  QStringList loadedNodes()const;
66 
67 protected:
70  void setLoadedNodes(const QStringList& nodes);
71 
72 protected:
73  QScopedPointer<qSlicerFileReaderPrivate> d_ptr;
74 
75 private:
76  Q_DECLARE_PRIVATE(qSlicerFileReader);
77  Q_DISABLE_COPY(qSlicerFileReader);
78 };
79 
80 #endif
Base class for qSlicerFileReader and qSlicerFileWriter.
Definition: qSlicerIO.h:39
QScopedPointer< qSlicerFileReaderPrivate > d_ptr