17 #ifndef mitkGradientDirectionPropertySerializer_h_included
18 #define mitkGradientDirectionPropertySerializer_h_included
33 mitkClassMacro( GradientDirectionsPropertySerializer, BasePropertySerializer )
34 itkFactorylessNewMacro(Self)
37 virtual TiXmlElement* Serialize()
override
39 if (
const GradientDirectionsProperty* prop = dynamic_cast<const GradientDirectionsProperty*>(m_Property.GetPointer()))
45 if(gdc.IsNull() || gdc->Size() == 0)
return nullptr;
48 GradientDirectionsContainerType::Iterator it = gdc->Begin();
49 GradientDirectionsContainerType::Iterator end = gdc->End();
51 auto element =
new TiXmlElement(
"gradientdirections");
54 auto child =
new TiXmlElement(
"entry");
57 child->SetAttribute(
"value", ss.str());
58 element->InsertEndChild(*child);
70 if (!element)
return nullptr;
75 TiXmlElement* entry = element->FirstChildElement(
"entry" )->ToElement();
76 while(entry !=
nullptr){
81 entry->QueryStringAttribute(
"value",&value);
84 vnl_vector_fixed<double, 3> vector;
85 vector.read_ascii(ss);
87 gdc->push_back(vector);
89 entry = entry->NextSiblingElement(
"entry" );
97 GradientDirectionsPropertySerializer() {}
98 virtual ~GradientDirectionsPropertySerializer() {}
#define MITK_REGISTER_SERIALIZER(classname)
itk::SmartPointer< Self > Pointer
DataCollection - Class to facilitate loading/accessing structured data.
itk::SmartPointer< Self > Pointer
#define MITKDIFFUSIONCORE_EXPORT
#define mitkClassMacro(className, SuperClassName)
itk::VectorContainer< IndexType, GradientDirectionType > GradientDirectionsContainerType
static itkEventMacro(BoundingShapeInteractionEvent, itk::AnyEvent) class MITKBOUNDINGSHAPE_EXPORT BoundingShapeInteractor Pointer New()
Basic interaction methods for mitk::GeometryData.