Slicer  5.1
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
List of all members | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes
qSlicerFileReader Class Reference

#include <Base/QTCore/qSlicerFileReader.h>

Inheritance diagram for qSlicerFileReader:
Inheritance graph
[legend]
Collaboration diagram for qSlicerFileReader:
Collaboration graph
[legend]

Public Types

typedef qSlicerIO Superclass
 
- Public Types inherited from qSlicerIO
typedef QString IOFileType
 
typedef QVariantMap IOProperties
 
typedef QObject Superclass
 

Public Member Functions

virtual bool canLoadFile (const QString &file) const
 
virtual bool examineFileInfoList (QFileInfoList &fileInfoList, QFileInfo &archetypeFileInfo, qSlicerIO::IOProperties &ioProperties) const
 
virtual QStringList extensions () const
 
virtual bool load (const IOProperties &properties)
 Properties availables : fileMode, multipleFiles, fileType. More...
 
virtual QStringList loadedNodes () const
 
 qSlicerFileReader (QObject *parent=nullptr)
 
QStringList supportedNameFilters (const QString &fileName, int *longestExtensionMatchPtr=nullptr) const
 
 ~qSlicerFileReader () override
 
- Public Member Functions inherited from qSlicerIO
virtual Q_INVOKABLE QString description () const =0
 Unique name of the reader/writer. More...
 
virtual Q_INVOKABLE IOFileType fileType () const =0
 Multiple readers can share the same file type. More...
 
virtual Q_INVOKABLE qSlicerIOOptionsoptions () const
 
 qSlicerIO (QObject *parent=nullptr)
 
Q_INVOKABLE vtkMRMLMessageCollectionuserMessages () const
 Additional warning or error messages occurred during IO operation. More...
 
 ~qSlicerIO () override
 
- Public Member Functions inherited from qSlicerObject
vtkMRMLScenemrmlScene () const
 Return a pointer on the MRML scene. More...
 
 qSlicerObject ()
 
virtual void setMRMLScene (vtkMRMLScene *)
 Set the current MRML scene to the widget. More...
 
virtual ~qSlicerObject ()
 

Protected Member Functions

virtual void setLoadedNodes (const QStringList &nodes)
 

Protected Attributes

QScopedPointer< qSlicerFileReaderPrivate > d_ptr
 
- Protected Attributes inherited from qSlicerIO
QScopedPointer< qSlicerIOPrivate > d_ptr
 
- Protected Attributes inherited from qSlicerObject
QScopedPointer< qSlicerObjectPrivate > d_ptr
 

Detailed Description

Definition at line 34 of file qSlicerFileReader.h.

Member Typedef Documentation

◆ Superclass

Definition at line 39 of file qSlicerFileReader.h.

Constructor & Destructor Documentation

◆ qSlicerFileReader()

qSlicerFileReader::qSlicerFileReader ( QObject *  parent = nullptr)
explicit

◆ ~qSlicerFileReader()

qSlicerFileReader::~qSlicerFileReader ( )
override

Member Function Documentation

◆ canLoadFile()

virtual bool qSlicerFileReader::canLoadFile ( const QString &  file) const
virtual

Returns true if the reader can load this file. Default implementation is a simple and fast, it just checks if file extension matches any of the wildcards returned by extensions() method.

Reimplemented in qSlicerScriptedFileReader.

◆ examineFileInfoList()

virtual bool qSlicerFileReader::examineFileInfoList ( QFileInfoList &  fileInfoList,
QFileInfo &  archetypeFileInfo,
qSlicerIO::IOProperties ioProperties 
) const
virtual

Implements the file list examination for the corresponding method in the core IO manager.

See also
qSlicerCoreIOManager

Reimplemented in qSlicerVolumesReader.

◆ extensions()

virtual QStringList qSlicerFileReader::extensions ( ) const
virtual

◆ load()

virtual bool qSlicerFileReader::load ( const IOProperties properties)
virtual

◆ loadedNodes()

virtual QStringList qSlicerFileReader::loadedNodes ( ) const
virtual

Return the list of generated nodes from loading the file(s) in load(). Empty list if load() failed

See also
setLoadedNodes(), load()

Reimplemented in qSlicerScriptedFileReader.

◆ setLoadedNodes()

virtual void qSlicerFileReader::setLoadedNodes ( const QStringList &  nodes)
protectedvirtual

Must be called in load() on success with the list of nodes added into the scene.

Reimplemented in qSlicerScriptedFileReader.

◆ supportedNameFilters()

QStringList qSlicerFileReader::supportedNameFilters ( const QString &  fileName,
int *  longestExtensionMatchPtr = nullptr 
) const

Return the matching name filters -> if the fileName is "myimage.nrrd" and the supported extensions are "Volumes (*.mha *.nrrd *.raw)", "Images (*.png" *.jpg")", "DICOM (*)" then it returns "Volumes (*.mha *.nrrd *.raw), DICOM (*)"

Parameters
longestExtensionMatchPtrIf non-zero then the method returns the length of the longest matched extension length in this argument. It can be used to determine how specifically extension matched.

Member Data Documentation

◆ d_ptr

QScopedPointer<qSlicerFileReaderPrivate> qSlicerFileReader::d_ptr
protected

Definition at line 81 of file qSlicerFileReader.h.


The documentation for this class was generated from the following file: