20 #include <itksys/SystemTools.hxx>
39 MITK_ERROR <<
" Object at " << (
const void *)this->m_Data
40 <<
" is not an mitk::LabelSetImage. Cannot serialize as LabelSetImage.";
44 std::string
filename(this->GetUniqueFilenameInWorkingDirectory());
46 filename += m_FilenameHint;
49 std::string fullname(m_WorkingDirectory);
51 fullname += itksys::SystemTools::ConvertToOutputPath(filename.c_str());
61 catch (std::exception &e)
63 MITK_ERROR <<
" Error serializing object at " << (
const void *)this->m_Data <<
" to " << fullname <<
": "
static void Save(const mitk::BaseData *data, const std::string &path)
Save a mitk::BaseData instance.
#define MITK_REGISTER_SERIALIZER(classname)
DataCollection - Class to facilitate loading/accessing structured data.
virtual std::string Serialize() override
Serializes given BaseData object.
virtual ~LabelSetImageSerializer()
static const std::string filename
Serializes mitk::LabelSetImage for mitk::SceneIO.
LabelSetImage class for handling labels and layers in a segmentation session.