Slicer  5.1
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 // Qt includes
25 #include <QFileInfo>
26 
27 // QtCore includes
28 #include "qSlicerIO.h"
29 #include "qSlicerBaseQTCoreExport.h"
30 
31 class qSlicerFileReaderOptions;
32 class qSlicerFileReaderPrivate;
33 
34 class Q_SLICER_BASE_QTCORE_EXPORT qSlicerFileReader
35  : public qSlicerIO
36 {
37  Q_OBJECT
38 public:
40  explicit qSlicerFileReader(QObject* parent = nullptr);
41  ~qSlicerFileReader() override;
42 
46  virtual QStringList extensions()const;
47 
51  virtual bool canLoadFile(const QString& file)const;
52 
60  QStringList supportedNameFilters(const QString& fileName, int* longestExtensionMatchPtr = nullptr)const;
61 
63  virtual bool load(const IOProperties& properties);
64 
68  virtual QStringList loadedNodes()const;
69 
73  virtual bool examineFileInfoList(QFileInfoList &fileInfoList, QFileInfo &archetypeFileInfo, qSlicerIO::IOProperties &ioProperties)const;
74 
75 protected:
78  virtual void setLoadedNodes(const QStringList& nodes);
79 
80 protected:
81  QScopedPointer<qSlicerFileReaderPrivate> d_ptr;
82 
83 private:
84  Q_DECLARE_PRIVATE(qSlicerFileReader);
85  Q_DISABLE_COPY(qSlicerFileReader);
86 };
87 
88 #endif
list extensions
Definition: conf.py:36
Base class for qSlicerFileReader and qSlicerFileWriter.
Definition: qSlicerIO.h:41
QScopedPointer< qSlicerFileReaderPrivate > d_ptr