23 #include <itksys/SystemTools.hxx>
44 MITK_ERROR <<
" Object at " << (
const void*) this->m_Data
45 <<
" is not an mitk::MAPRegistrationWrapper. Cannot serialize as MAPRegistrationWrapper for MatchPoint registration objects.";
49 std::string
filename( this->GetUniqueFilenameInWorkingDirectory() );
51 filename += m_FilenameHint;
54 std::string fullname(m_WorkingDirectory);
56 fullname += itksys::SystemTools::ConvertToOutputPath(filename.c_str());
62 writer.AbstractFileWriter::SetInput( const_cast<mitk::MAPRegistrationWrapper*>( wrapper ) );
65 catch (std::exception& e)
67 MITK_ERROR <<
" Error serializing object at " << (
const void*) this->m_Data
#define MITK_REGISTER_SERIALIZER(classname)
virtual void Write()
Write the base data to the specified location or output stream.
virtual std::string Serialize()
Serializes given BaseData object.
DataCollection - Class to facilitate loading/accessing structured data.
MAPRegistrationWrapper Wrapper class to allow the handling of MatchPoint registration objects as mitk...
Serializes mitk::MAPRegistrationWrapper for mitk::SceneIO.
static const std::string filename
virtual ~MAPRegistrationWrapperSerializer()
virtual void SetOutputLocation(const std::string &location) override
Set the output location.