Slicer 5.13
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
Loading...
Searching...
No Matches
qSlicerNodeWriter Class Reference

#include <Base/QTGUI/qSlicerNodeWriter.h>

Inheritance diagram for qSlicerNodeWriter:
Collaboration diagram for qSlicerNodeWriter:

Public Types

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

Properties

bool supportUseCompression
 Some storage nodes don't support the compression option.
 

Public Member Functions

virtual vtkMRMLNode * getNodeByID (const char *id) const
 
vtkMRMLNodeWriter * nodeWriter () const
 VTK-based writer that performs all tasks.
 
qSlicerIOOptions * options () const override
 Options widget (for writers that call this method from their options() implementation).
 
 qSlicerNodeWriter (const QString &description, const qSlicerIO::IOFileType &fileType, const QStringList &nodeClassNames, bool supportUseCompression, QObject *parent)
 
 qSlicerNodeWriter (QObject *parent)
 
void setSupportUseCompression (bool support)
 
bool supportUseCompression () const
 
bool write (const qSlicerIO::IOProperties &properties) override
 
- Public Member Functions inherited from qSlicerVTKFileWriter
bool canWriteObject (vtkObject *object) const override
 
double canWriteObjectConfidence (vtkObject *object) const override
 
QString description () const override
 Unique name of the reader/writer.
 
QStringList extensions (vtkObject *object) const override
 
IOFileType fileType () const override
 Multiple readers can share the same file type.
 
Q_INVOKABLE vtkMRMLFileWriter * fileWriter () const
 VTK-based writer that performs all the tasks of this class.
 
vtkMRMLFileIOHandler * ioHandler () const override
 Returns the VTK-based writer (same as fileWriter()).
 
 qSlicerVTKFileWriter (vtkMRMLFileWriter *writer, QObject *parent=nullptr)
 
void setMRMLScene (vtkMRMLScene *scene) override
 Set the scene of this object and of the VTK-based writer.
 
vtkMRMLMessageCollection * userMessages () const override
 Additional warning or error messages occurred during IO operation.
 
bool write (const qSlicerIO::IOProperties &properties) override
 
QStringList writtenNodes () const override
 
 ~qSlicerVTKFileWriter () override
 
- Public Member Functions inherited from qSlicerFileWriter
 qSlicerFileWriter (QObject *parent=nullptr)
 
 ~qSlicerFileWriter () override
 
- Public Member Functions inherited from qSlicerIO
 qSlicerIO (QObject *parent=nullptr)
 
 ~qSlicerIO () override
 
- Public Member Functions inherited from qSlicerObject
vtkMRMLScene * mrmlScene () const
 Return a pointer on the MRML scene.
 
 qSlicerObject ()
 
virtual ~qSlicerObject ()
 

Protected Member Functions

QStringList nodeClassNames () const
 
void setNodeClassNames (const QStringList &nodeClassNames)
 
- Protected Member Functions inherited from qSlicerVTKFileWriter
void setFileWriter (vtkMRMLFileWriter *writer)
 
void setWrittenNodes (const QStringList &nodes) override
 

Additional Inherited Members

- Static Public Member Functions inherited from qSlicerIO
static IOProperties fromVTKProperties (vtkMRMLIOProperties *vtkProperties)
 
static bool qImageToVTKImageData (const QImage &image, vtkImageData *imageData)
 Convert Qt image to VTK image (RGBA, unsigned char).
 
static void toVTKProperties (const IOProperties &properties, vtkMRMLIOProperties *vtkProperties)
 
static QImage vtkImageDataToQImage (vtkImageData *imageData)
 Convert VTK image (unsigned char, 1, 3, or 4 components) to Qt image.
 
- Protected Attributes inherited from qSlicerVTKFileWriter
QScopedPointer< qSlicerVTKFileWriterPrivate > d_ptr
 
- Protected Attributes inherited from qSlicerFileWriter
QScopedPointer< qSlicerFileWriterPrivate > d_ptr
 
- Protected Attributes inherited from qSlicerIO
QScopedPointer< qSlicerIOPrivate > d_ptr
 
- Protected Attributes inherited from qSlicerObject
QScopedPointer< qSlicerObjectPrivate > d_ptr
 

Detailed Description

Utility class that is ready to use for most of the nodes.

Deprecated
All tasks are delegated to vtkMRMLNodeWriter.

Definition at line 42 of file qSlicerNodeWriter.h.

Member Typedef Documentation

◆ Superclass

Property Documentation

◆ supportUseCompression

bool qSlicerNodeWriter::supportUseCompression
readwrite

Some storage nodes don't support the compression option.

Definition at line 46 of file qSlicerNodeWriter.h.

Constructor & Destructor Documentation

◆ qSlicerNodeWriter() [1/2]

qSlicerNodeWriter::qSlicerNodeWriter ( const QString & description,
const qSlicerIO::IOFileType & fileType,
const QStringList & nodeClassNames,
bool supportUseCompression,
QObject * parent )
inline

Definition at line 50 of file qSlicerNodeWriter.h.

◆ qSlicerNodeWriter() [2/2]

qSlicerNodeWriter::qSlicerNodeWriter ( QObject * parent)
inlineexplicit

Constructor for subclasses. A default vtkMRMLNodeWriter is created, which may be replaced by a vtkMRMLNodeWriter subclass by calling setFileWriter.

Definition at line 108 of file qSlicerNodeWriter.h.

Member Function Documentation

◆ getNodeByID()

virtual vtkMRMLNode * qSlicerNodeWriter::getNodeByID ( const char * id) const
inlinevirtual

Definition at line 68 of file qSlicerNodeWriter.h.

◆ nodeClassNames()

QStringList qSlicerNodeWriter::nodeClassNames ( ) const
inlineprotected

Definition at line 125 of file qSlicerNodeWriter.h.

◆ nodeWriter()

vtkMRMLNodeWriter * qSlicerNodeWriter::nodeWriter ( ) const
inline

VTK-based writer that performs all tasks.

Definition at line 63 of file qSlicerNodeWriter.h.

◆ options()

qSlicerIOOptions * qSlicerNodeWriter::options ( ) const
inlineoverridevirtual

Options widget (for writers that call this method from their options() implementation).

Reimplemented from qSlicerIO.

Definition at line 99 of file qSlicerNodeWriter.h.

◆ setNodeClassNames()

void qSlicerNodeWriter::setNodeClassNames ( const QStringList & nodeClassNames)
inlineprotected

Definition at line 116 of file qSlicerNodeWriter.h.

◆ setSupportUseCompression()

void qSlicerNodeWriter::setSupportUseCompression ( bool support)
inline

Definition at line 65 of file qSlicerNodeWriter.h.

◆ supportUseCompression()

bool qSlicerNodeWriter::supportUseCompression ( ) const
inline

Definition at line 66 of file qSlicerNodeWriter.h.

◆ write()

bool qSlicerNodeWriter::write ( const qSlicerIO::IOProperties & properties)
inlineoverridevirtual

Write the node identified by "nodeID" property into the "fileName" file. The node is found using getNodeByID() and checked using canWriteObjectConfidence(), which may be overridden in subclasses, then the VTK-based writer writes the node.

Reimplemented from qSlicerFileWriter.

Definition at line 73 of file qSlicerNodeWriter.h.


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