Slicer  4.11
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

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...
 
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 QString description () const =0
 Unique name of the reader/writer. More...
 
virtual IOFileType fileType () const =0
 Multiple readers can share the same file type. More...
 
virtual qSlicerIOOptionsoptions () const
 
 qSlicerIO (QObject *parent=nullptr)
 
 ~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

void setLoadedNodes (const QStringList &nodes)
 

Protected Attributes

QScopedPointer< qSlicerFileReaderPrivate > 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()

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

Based on the file extensions, returns true if the file can be read, false otherwise. This function is relatively fast as it doesn't try to access the file.

◆ 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()

QStringList qSlicerFileReader::loadedNodes ( ) const

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

See also
setLoadedNodes(), load()

◆ setLoadedNodes()

void qSlicerFileReader::setLoadedNodes ( const QStringList &  nodes)
protected

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

◆ 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: