#include <Base/QTCore/qSlicerCoreIOManager.h>
|
QScopedPointer< qSlicerCoreIOManagerPrivate > | d_ptr |
|
Definition at line 46 of file qSlicerCoreIOManager.h.
◆ qSlicerCoreIOManager()
qSlicerCoreIOManager::qSlicerCoreIOManager |
( |
QObject * |
parent = 0 | ) |
|
◆ ~qSlicerCoreIOManager()
virtual qSlicerCoreIOManager::~qSlicerCoreIOManager |
( |
| ) |
|
|
virtual |
◆ allReadableFileExtensions()
Q_INVOKABLE QStringList qSlicerCoreIOManager::allReadableFileExtensions |
( |
| ) |
const |
Return a string list of all the readable file extensions for all registered types of storage nodes. Includes the leading dot.
◆ allWritableFileExtensions()
Q_INVOKABLE QStringList qSlicerCoreIOManager::allWritableFileExtensions |
( |
| ) |
const |
Return a string list of all the writable file extensions for all registered types of storage nodes. Includes the leading dot.
◆ completeSlicerWritableFileNameSuffix()
Q_INVOKABLE QString qSlicerCoreIOManager::completeSlicerWritableFileNameSuffix |
( |
vtkMRMLStorableNode * |
node | ) |
const |
Returns a full extension for this storable node that is recognised by Slicer IO. Consults the storage node for a list of known suffixes, if no match is found and the .* extension exists, return the Qt completeSuffix string. If .* is not in the complete list of known suffixes, returns an empty suffix. Always includes the leading dot.
◆ createAndAddDefaultStorageNode()
Create and add default storage node.
◆ emitNewFileLoaded()
Q_INVOKABLE void qSlicerCoreIOManager::emitNewFileLoaded |
( |
const QVariantMap & |
loadedFileParameters | ) |
|
◆ fileDescriptions()
Q_INVOKABLE QStringList qSlicerCoreIOManager::fileDescriptions |
( |
const QString & |
file | ) |
const |
Return the file description associated with a file Usually the description is a short text of one or two words e.g. Volume, Model, ...
◆ fileDescriptionsByType()
◆ fileOptions()
qSlicerIOOptions* qSlicerCoreIOManager::fileOptions |
( |
const QString & |
fileDescription | ) |
const |
Return the file option associated with a file type.
◆ fileType()
Return the file type associated with a file.
◆ fileTypeFromDescription()
Q_INVOKABLE qSlicerIO::IOFileType qSlicerCoreIOManager::fileTypeFromDescription |
( |
const QString & |
fileDescription | ) |
const |
◆ fileTypes()
◆ fileWriterDescriptions()
Q_INVOKABLE QStringList qSlicerCoreIOManager::fileWriterDescriptions |
( |
const qSlicerIO::IOFileType & |
fileType | ) |
const |
◆ fileWriterExtensions()
Q_INVOKABLE QStringList qSlicerCoreIOManager::fileWriterExtensions |
( |
vtkObject * |
object | ) |
const |
◆ fileWriterFileType()
Return the file type associated with an VTK object.
◆ fileWriterOptions()
qSlicerIOOptions* qSlicerCoreIOManager::fileWriterOptions |
( |
vtkObject * |
object, |
|
|
const QString & |
extension |
|
) |
| const |
◆ loadFile()
Q_INVOKABLE bool qSlicerCoreIOManager::loadFile |
( |
const QString & |
fileName | ) |
|
Convenient function to load a file. All the options (e.g. filetype) are chosen by default.
◆ loadNodes() [1/2]
virtual Q_INVOKABLE bool qSlicerCoreIOManager::loadNodes |
( |
const qSlicerIO::IOFileType & |
fileType, |
|
|
const QVariantMap & |
parameters, |
|
|
vtkCollection * |
loadedNodes = 0 |
|
) |
| |
|
virtual |
Load a list of nodes corresponding to fileType. A given fileType corresponds to a specific reader qSlicerIO. A map of qvariant allows to specify which parameters should be passed to the reader. The function return 0 if it fails. The map associated with most of the fileType should contains either fileName (QString or QStringList) or fileNames (QStringList). More specific parameters could also be set. For example, the volume reader qSlicerVolumesIO could also be called with the following parameters: LabelMap (bool), Center (bool)
- Note
- Make also sure the case of parameter name is respected
- See also
- qSlicerIO::IOProperties, qSlicerIO::IOFileType, saveNodes()
Reimplemented in qSlicerIOManager.
◆ loadNodes() [2/2]
Utility function that loads a bunch of files. The "fileType" attribute should in the parameter map for each node to load.
Reimplemented in qSlicerIOManager.
◆ loadNodesAndGetFirst()
Load a list of node corresponding to fileType and return the first loaded node. This function is provided for convenience and is equivalent to call loadNodes with a vtkCollection parameter and retrieve the first element.
◆ loadScene()
Q_INVOKABLE bool qSlicerCoreIOManager::loadScene |
( |
const QString & |
fileName, |
|
|
bool |
clear = true |
|
) |
| |
Load/import a scene corresponding to fileName This function is provided for convenience and is equivalent to call loadNodes function with QString("SceneFile")
◆ newFileLoaded
◆ reader()
qSlicerFileReader* qSlicerCoreIOManager::reader |
( |
const QString & |
ioDescription | ) |
const |
|
protected |
◆ readers() [1/2]
Returns the list of registered readers.
◆ readers() [2/2]
Returns the list of registered readers or writers associated with fileType.
◆ registerIO()
void qSlicerCoreIOManager::registerIO |
( |
qSlicerIO * |
io | ) |
|
Register the reader/writer io Note also that the IOManager takes ownership of io
◆ saveNodes()
◆ saveScene()
Q_INVOKABLE bool qSlicerCoreIOManager::saveScene |
( |
const QString & |
fileName, |
|
|
QImage |
screenShot |
|
) |
| |
Save a scene corresponding to fileName This function is provided for convenience and is equivalent to call saveNodes function with QString("SceneFile") with the fileName and screenShot set as properties.
◆ writers() [1/2]
Returns the list of registered writers.
◆ writers() [2/2]
Returns the list of registered writers for a given fileType.
◆ d_ptr
QScopedPointer<qSlicerCoreIOManagerPrivate> qSlicerCoreIOManager::d_ptr |
|
protected |
The documentation for this class was generated from the following file: