35 if (simulation == NULL)
37 MITK_ERROR <<
" Invalid simulation object cannot be serialized!";
41 std::string
filename(this->GetUniqueFilenameInWorkingDirectory());
42 filename +=
"_" + m_FilenameHint +
".scn";
44 std::string fullPath = m_WorkingDirectory;
49 IOUtil::Save(const_cast<Simulation*>(simulation), fullPath);
51 catch (
const std::exception& e)
53 MITK_ERROR <<
" Error serializing simulation object to " << fullPath <<
": " << e.what();
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.
static const std::string filename
std::string Serialize() override
Serializes given BaseData object.