Slicer
4.8
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
|
#include <Base/QTGUI/qSlicerIOManager.h>
Public Types | |
typedef qSlicerCoreIOManager | Superclass |
Public Slots | |
bool | openAddColorTableDialog () |
bool | openAddDataDialog () |
bool | openAddDataDialog (QString fileName) |
bool | openAddFiberBundleDialog () |
bool | openAddFiducialDialog () |
bool | openAddModelDialog () |
bool | openAddScalarOverlayDialog () |
bool | openAddSceneDialog () |
bool | openAddTransformDialog () |
bool | openAddVolumeDialog () |
bool | openAddVolumesDialog () |
bool | openLoadSceneDialog () |
bool | openSaveDataDialog () |
void | openSceneViewsDialog () |
void | openScreenshotDialog () |
Public Member Functions | |
void | addHistory (const QString &path) |
void | dragEnterEvent (QDragEnterEvent *event) |
void | dropEvent (QDropEvent *event) |
const QList< QUrl > & | favorites () const |
const QStringList & | history () const |
virtual Q_INVOKABLE bool | loadNodes (const qSlicerIO::IOFileType &fileType, const qSlicerIO::IOProperties ¶meters, vtkCollection *loadedNodes=0) |
virtual bool | loadNodes (const QList< qSlicerIO::IOProperties > &files, vtkCollection *loadedNodes=0) |
Q_INVOKABLE bool | openDialog (qSlicerIO::IOFileType fileType, qSlicerFileDialog::IOAction action, qSlicerIO::IOProperties ioProperties=qSlicerIO::IOProperties(), vtkCollection *loadedNodes=0) |
qSlicerIOManager (QObject *parent=0) | |
void | registerDialog (qSlicerFileDialog *dialog) |
void | setFavorites (const QList< QUrl > &urls) |
virtual | ~qSlicerIOManager () |
Public Member Functions inherited from qSlicerCoreIOManager | |
Q_INVOKABLE QStringList | allReadableFileExtensions () const |
Q_INVOKABLE QStringList | allWritableFileExtensions () const |
Q_INVOKABLE QString | completeSlicerWritableFileNameSuffix (vtkMRMLStorableNode *node) const |
Q_INVOKABLE void | emitNewFileLoaded (const QVariantMap &loadedFileParameters) |
Q_INVOKABLE QStringList | fileDescriptions (const QString &file) const |
QStringList | fileDescriptionsByType (const qSlicerIO::IOFileType fileType) const |
qSlicerIOOptions * | fileOptions (const QString &fileDescription) const |
Return the file option associated with a file type. More... | |
Q_INVOKABLE qSlicerIO::IOFileType | fileType (const QString &file) const |
Return the file type associated with a file. More... | |
Q_INVOKABLE qSlicerIO::IOFileType | fileTypeFromDescription (const QString &fileDescription) const |
Q_INVOKABLE QList< qSlicerIO::IOFileType > | fileTypes (const QString &file) const |
Q_INVOKABLE QStringList | fileWriterDescriptions (const qSlicerIO::IOFileType &fileType) const |
Q_INVOKABLE QStringList | fileWriterExtensions (vtkObject *object) const |
Q_INVOKABLE qSlicerIO::IOFileType | fileWriterFileType (vtkObject *object) const |
Return the file type associated with an VTK object. More... | |
qSlicerIOOptions * | fileWriterOptions (vtkObject *object, const QString &extension) const |
Q_INVOKABLE bool | loadFile (const QString &fileName) |
vtkMRMLNode * | loadNodesAndGetFirst (qSlicerIO::IOFileType fileType, const qSlicerIO::IOProperties ¶meters) |
Q_INVOKABLE bool | loadScene (const QString &fileName, bool clear=true) |
qSlicerCoreIOManager (QObject *parent=0) | |
void | registerIO (qSlicerIO *io) |
Q_INVOKABLE bool | saveNodes (qSlicerIO::IOFileType fileType, const QVariantMap ¶meters) |
Q_INVOKABLE bool | saveScene (const QString &fileName, QImage screenShot) |
virtual | ~qSlicerCoreIOManager () |
Protected Slots | |
void | updateProgressDialog () |
Protected Attributes | |
QScopedPointer< qSlicerIOManagerPrivate > | d_ptr |
Protected Attributes inherited from qSlicerCoreIOManager | |
QScopedPointer< qSlicerCoreIOManagerPrivate > | d_ptr |
Friends | |
class | qSlicerFileDialog |
Additional Inherited Members | |
Signals inherited from qSlicerCoreIOManager | |
void | newFileLoaded (const qSlicerIO::IOProperties &loadedFileParameters) |
Static Public Member Functions inherited from qSlicerCoreIOManager | |
static Q_INVOKABLE vtkMRMLStorageNode * | createAndAddDefaultStorageNode (vtkMRMLStorableNode *node) |
Create and add default storage node. More... | |
Protected Member Functions inherited from qSlicerCoreIOManager | |
qSlicerFileReader * | reader (const QString &ioDescription) const |
const QList< qSlicerFileReader * > & | readers () const |
Returns the list of registered readers. More... | |
QList< qSlicerFileReader * > | readers (const qSlicerIO::IOFileType &fileType) const |
Returns the list of registered readers or writers associated with fileType. More... | |
const QList< qSlicerFileWriter * > & | writers () const |
Returns the list of registered writers. More... | |
QList< qSlicerFileWriter * > | writers (const qSlicerIO::IOFileType &fileType) const |
Returns the list of registered writers for a given fileType. More... | |
Definition at line 26 of file qSlicerIOManager.h.
Definition at line 31 of file qSlicerIOManager.h.
qSlicerIOManager::qSlicerIOManager | ( | QObject * | parent = 0 | ) |
|
virtual |
void qSlicerIOManager::addHistory | ( | const QString & | path | ) |
void qSlicerIOManager::dragEnterEvent | ( | QDragEnterEvent * | event | ) |
dragEnterEvents can be forwarded to the IOManager, if a registered dialog supports it, the event is accepted, otherwise ignored.
void qSlicerIOManager::dropEvent | ( | QDropEvent * | event | ) |
Search, in the list of registered readers, the first dialog that handles the drop event. If the event is accepted by the dialog ( usually the is also used to populate the dialog), the manager opens the dialog, otherwise the next dialog is tested. The order in which dialogs are being tested is the opposite of the dialogs are registered.
const QList<QUrl>& qSlicerIOManager::favorites | ( | ) | const |
const QStringList& qSlicerIOManager::history | ( | ) | const |
|
virtual |
Displays a progress dialog if it takes too long to load There is no way to know in advance how long the loading will take, so the progress dialog listens to the scene and increment the progress anytime a node is added.
Reimplemented from qSlicerCoreIOManager.
|
virtual |
If you have a list of nodes to load, it's best to use this function in order to have a unique progress dialog instead of multiple ones. It internally calls loadNodes() for each file.
Reimplemented from qSlicerCoreIOManager.
|
inlineslot |
Definition at line 165 of file qSlicerIOManager.h.
|
inlineslot |
Definition at line 127 of file qSlicerIOManager.h.
|
inlineslot |
Definition at line 119 of file qSlicerIOManager.h.
|
inlineslot |
Definition at line 177 of file qSlicerIOManager.h.
|
inlineslot |
Definition at line 171 of file qSlicerIOManager.h.
|
inlineslot |
Definition at line 147 of file qSlicerIOManager.h.
|
inlineslot |
Definition at line 153 of file qSlicerIOManager.h.
|
slot |
|
inlineslot |
Definition at line 159 of file qSlicerIOManager.h.
|
inlineslot |
Definition at line 133 of file qSlicerIOManager.h.
|
inlineslot |
Definition at line 139 of file qSlicerIOManager.h.
Q_INVOKABLE bool qSlicerIOManager::openDialog | ( | qSlicerIO::IOFileType | fileType, |
qSlicerFileDialog::IOAction | action, | ||
qSlicerIO::IOProperties | ioProperties = qSlicerIO::IOProperties() , |
||
vtkCollection * | loadedNodes = 0 |
||
) |
Search for the most appropriate dialog based on the action and fileType, and open it. Once the user select the file(s), the action (read or write) is done. Note that to write a node, the "nodeID" property must be passed. If no dialog is registered for a given fileType (e.g. QString("SceneFile")), a default dialog (qSlicerStandardFileDialog) is used. If reading files (action == qSlicerFileDialog::Read) and if loadedNodes is not null, the loadedNodes collection is being populated with the loaded nodes. Returns true on success, false otherwise.
|
slot |
|
inlineslot |
Definition at line 183 of file qSlicerIOManager.h.
|
slot |
|
slot |
void qSlicerIOManager::registerDialog | ( | qSlicerFileDialog * | dialog | ) |
Takes ownership. Any previously set dialog corresponding to the same fileType (only 1 dialog per filetype) is overriden.
void qSlicerIOManager::setFavorites | ( | const QList< QUrl > & | urls | ) |
|
protectedslot |
|
friend |
Definition at line 108 of file qSlicerIOManager.h.
|
protected |
Definition at line 111 of file qSlicerIOManager.h.