|
Medical Imaging Interaction Toolkit
2026.06.00
Medical Imaging Interaction Toolkit
|
Base class for objects that serialize BaseData types to files. More...
#include <mitkBaseDataSerializer.h>


Public Member Functions | |
| mitkClassMacroItkParent (BaseDataSerializer, itk::Object) | |
| virtual void | SetFilenameHint (const char *_arg) |
| Sets a hint for the output filename (without path or extension). More... | |
| virtual const char * | GetFilenameHint () const |
| Returns the current filename hint. More... | |
| virtual void | SetWorkingDirectory (const char *_arg) |
| Sets the working directory where serialized files will be stored. More... | |
| virtual const char * | GetWorkingDirectory () const |
| Returns the current working directory for serialized files. More... | |
| virtual void | SetData (const BaseData *_arg) |
| Sets the BaseData object to be serialized. More... | |
| virtual std::string | Serialize () |
| Serializes the previously set BaseData object to a file. More... | |
Protected Member Functions | |
| BaseDataSerializer () | |
| ~BaseDataSerializer () override | |
| std::string | GetUniqueFilenameInWorkingDirectory () |
Protected Attributes | |
| std::string | m_FilenameHint |
| std::string | m_WorkingDirectory |
| BaseData::ConstPointer | m_Data |
Base class for objects that serialize BaseData types to files.
Provides the interface for serializing mitk::BaseData-derived objects into files on disk. Sub-classes must implement the actual serialization logic.
The naming convention for sub-classes must follow this pattern:
* If the class derived from BaseData is called GreenData * Then the serializer for this class must be called GreenDataSerializer *
Sub-classes are discovered at runtime through the ITK object factory mechanism. Use the MITK_REGISTER_SERIALIZER macro to register a new serializer.
Definition at line 41 of file mitkBaseDataSerializer.h.
|
protected |
|
overrideprotected |
|
virtual |
Returns the current filename hint.
|
protected |
|
virtual |
Returns the current working directory for serialized files.
| mitk::BaseDataSerializer::mitkClassMacroItkParent | ( | BaseDataSerializer | , |
| itk::Object | |||
| ) |
|
virtual |
Serializes the previously set BaseData object to a file.
The base implementation logs the request and returns an empty string. Sub-classes must override this method to perform the actual serialization, writing data to a file in the working directory.
Reimplemented in mitk::SegmentationTaskListSerializer, mitk::SurfaceSerializer, mitk::PointSetSerializer, mitk::ImageSerializer, mitk::GeometryDataSerializer, mitk::ROISerializer, mitk::PlanarFigureSerializer, mitk::MultiLabelSegmentationSerializer, mitk::MAPRegistrationWrapperSerializer, mitk::ContourModelSetSerializer, mitk::ContourModelSerializer, and mitk::ExampleDataStructureSerializer.
|
virtual |
|
virtual |
Sets a hint for the output filename (without path or extension).
|
virtual |
Sets the working directory where serialized files will be stored.
|
protected |
Definition at line 85 of file mitkBaseDataSerializer.h.
|
protected |
Definition at line 83 of file mitkBaseDataSerializer.h.
|
protected |
Definition at line 84 of file mitkBaseDataSerializer.h.