21 #include <itksys/SystemTools.hxx>
42 MITK_ERROR <<
" Object at " << (
const void*) this->m_Data
43 <<
" is not an mitk::NrrdTensorImage. Cannot serialize as NrrdTensorImage.";
47 std::string
filename( this->GetUniqueFilenameInWorkingDirectory() );
49 filename += m_FilenameHint;
52 std::string fullname(m_WorkingDirectory);
54 fullname += itksys::SystemTools::ConvertToOutputPath(filename.c_str());
60 writer.
SetInput(const_cast<TensorImage*>(image));
63 catch (std::exception& e)
65 MITK_ERROR <<
" Error serializing object at " << (
const void*) this->m_Data
virtual ~TensorImageSerializer()
#define MITK_REGISTER_SERIALIZER(classname)
virtual void SetInput(const BaseData *data) override
Set the input data for writing.
DataCollection - Class to facilitate loading/accessing structured data.
virtual std::string Serialize() override
Serializes given BaseData object.
Serializes mitk::Surface for mitk::SceneIO.
static const std::string filename
virtual void SetOutputLocation(const std::string &location) override
Set the output location.
virtual void Write() override
Write the base data to the specified location or output stream.
this class encapsulates tensor images