21 #include <itksys/SystemTools.hxx>
38 MITK_ERROR <<
" Object at " << (
const void *)this->m_Data
39 <<
" is not an mitk::ExampleDataStructure. Cannot serialize as ExampleDataStructure.";
43 std::string
filename(this->GetUniqueFilenameInWorkingDirectory());
45 filename += m_FilenameHint;
48 std::string fullname(m_WorkingDirectory);
50 fullname += itksys::SystemTools::ConvertToOutputPath(filename.c_str());
56 catch (std::exception &e)
58 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.
static const std::string filename
virtual ~ExampleDataStructureSerializer()
Serializes mitk::ExampleDataStructure for mitk::SceneIO.