58 auto *decl =
new TiXmlDeclaration(
60 doc.LinkEndChild(decl);
62 auto *rootNode =
new TiXmlElement(
"GeometryData");
63 doc.LinkEndChild(rootNode);
66 auto *version =
new TiXmlElement(
"Version");
67 version->SetAttribute(
"Writer", __FILE__);
68 version->SetAttribute(
"FileVersion", 1);
69 rootNode->LinkEndChild(version);
74 if ((timeGeometry = dynamic_cast<const ProportionalTimeGeometry *>(data->GetTimeGeometry())))
77 rootNode->LinkEndChild(timeGeometryElement);
81 MITK_WARN <<
"Serializing GeometryData that does not have a valid ProportionalTimeGeometry! Not implemented!";
AbstractFileWriter(const AbstractFileWriter &other)
An output stream wrapper.
static TiXmlElement * ToXML(const ProportionalTimeGeometry *geometry)
Serialize given geometry to XML.
Convenience class to temporarily change the current locale.
~GeometryDataWriterService() override
GeometryDataWriterService()
const BaseData * GetInput() const override
Get the input data set via SetInput().
Data class only having a BaseGeometry but not containing any specific data.
void Write() override
Write the base data to the specified location or output stream.
us::ServiceRegistration< IFileWriter > RegisterService(us::ModuleContext *context=us::GetModuleContext())
Base class for writing mitk::BaseData objects to files or streams.