74 mitk::PropertyListSerializer::Pointer serializer =
113 propList->SetProperty(
"PlaneOrientationProperty",
143 lt->ChangeOpacityForAll(0.25);
144 lt->ChangeOpacity(17, 0.88);
217 for (
auto it = propList->
GetMap()->begin();
218 it != propList->
GetMap()->end();
223 std::string serializername = std::string(prop->GetNameOfClass()) +
"Serializer";
224 std::list<itk::LightObject::Pointer> allSerializers =
225 itk::ObjectFactoryBase::CreateAllInstance(serializername.c_str());
226 MITK_TEST_CONDITION(allSerializers.size() > 0, std::string(
"Creating serializers for ") + serializername);
227 if (allSerializers.size() == 0)
229 MITK_TEST_OUTPUT(<<
"serialization not possible, skipping " << prop->GetNameOfClass());
232 if (allSerializers.size() > 1)
234 MITK_TEST_OUTPUT(<<
"Warning: " << allSerializers.size() <<
" serializers found for " << prop->GetNameOfClass()
235 <<
"testing only the first one.");
240 if (serializer !=
nullptr)
242 serializer->SetProperty(prop);
243 TiXmlElement *valueelement =
nullptr;
246 valueelement = serializer->Serialize();
251 MITK_TEST_CONDITION(valueelement !=
nullptr, std::string(
"Serialize property with ") + serializername);
253 if (valueelement ==
nullptr)
261 if (deserializedProp.IsNotNull())
264 "deserialized property equals initial property for type " << prop->GetNameOfClass());
270 << allSerializers.begin()->GetPointer()->GetNameOfClass())
void SetTableValue(IdentifierType id, ValueType value)
#define MITK_TEST_CONDITION_REQUIRED(COND, MSG)
int mitkPropertySerializationTest(int, char *[])
Test for all PropertySerializer classes.
section GeneralTestsDeprecatedOldTestingStyle Deprecated macros All tests with MITK_TEST_BEGIN()
Key-value list holding instances of BaseProperty.
void FillVector3D(Tout &out, mitk::ScalarType x, mitk::ScalarType y, mitk::ScalarType z)
#define MITK_TEST_OUTPUT(x)
Output some text.
The LevelWindow class Class to store level/window values.
Abstract base class for properties.
#define MITK_TEST_CONDITION(COND, MSG)
void TestAllProperties(const mitk::PropertyList *propList)
Base class for objects that serialize BaseProperty types.
void FillVector4D(Tout &out, mitk::ScalarType x, mitk::ScalarType y, mitk::ScalarType z, mitk::ScalarType t)
specializations of GenericLookupTable
const PropertyMap * GetMap() const