HomePhabricator
Diffusion MITK 0dc8d11bd244

refactored PropertyDescription and PropertyPersistance service to support…

Description

refactored PropertyDescription and PropertyPersistance service to support regular expression.

Signed-off-by: Ralf Floca <r.floca@dkfz-heidelberg.de>

Details

Auditors
floca
hering
Provenance
flocaAuthored on Jun 18 2016, 3:32 PM
Parents
rMITK297245a632a3: replaced deprecated testing macros, added more tests for…
Branches
Unknown
Tags
Unknown

Event Timeline

hering added a subscriber: hering.
hering added inline comments.
/Modules/Core/include/mitkPropertyPersistence.h
33

this API-change discards the possibility to use string (or imlicitely-casted const char*) when adding a property info as is done in the Diffusion module.

Please consider the fix done in rMITKcd08fbc9b764 prior to master merge.

floca added a subscriber: wald.

The problem is fixed in the integration branch of T19791. Thanks for the hint.

@hering, @wald : Please note that your fix is not correct. It compiles (by accident), but you result with having the persistent keys equal the names.
The correct fix would be

mitk::PropertyPersistenceInfo::Pointer PPI_referenceBValue = mitk::PropertyPersistenceInfo::New();
PPI_referenceBValue->SetNameAndKey(mitk::DiffusionPropertyHelper::REFERENCEBVALUEPROPERTYNAME, "DWMRI_b-value");
mitk::PropertyPersistenceInfo::Pointer PPI_measurementFrame = mitk::PropertyPersistenceInfo::New();
PPI_measurementFrame->SetNameAndKey(mitk::DiffusionPropertyHelper::MEASUREMENTFRAMEPROPERTYNAME, "measurement frame");
mitk::PropertyPersistenceInfo::Pointer PPI_gradientContainer = mitk::PropertyPersistenceInfo::New();
PPI_gradientContainer->SetNameAndKey(mitk::DiffusionPropertyHelper::GRADIENTCONTAINERPROPERTYNAME, "DWMRI_gradient");
mitk::PropertyPersistenceInfo::Pointer PPI_modality = mitk::PropertyPersistenceInfo::New();
PPI_modality->SetNameAndKey(mitk::DiffusionPropertyHelper::MODALITY, "modality");
	
mitk::CoreServices::GetPropertyPersistence()->AddInfo(PPI_referenceBValue.GetPointer() , true);
mitk::CoreServices::GetPropertyPersistence()->AddInfo(PPI_measurementFrame.GetPointer(), true);
mitk::CoreServices::GetPropertyPersistence()->AddInfo(PPI_gradientContainer.GetPointer(), true);
mitk::CoreServices::GetPropertyPersistence()->AddInfo(PPI_modality.GetPointer(), true);

@hering Could you please accept the audit or raise further concerns in order to know how to proceed (and hopefully close this audit). thanks.