Current status:
- LabelSetImageIO ignores time geometry information. As a result the timing information gets lost when stored into a file and is a simple default PropertionalTimeGeometrie if loaded again.
- LabelSetImageIO does not support property serialization
To fixe that the Write() and Read() method of LabelSetImageIO should be extended by the same business logic used in ItkImageIO.
There the support is done in the following locations:
- Write time geometry: mitkItkImageIO.cpp; lines 613 - 630
// Handle time geometry const auto *arbitraryTG = dynamic_cast<const ArbitraryTimeGeometry *>(image->GetTimeGeometry()); if (arbitraryTG) [...] itk::EncapsulateMetaData<std::string>( m_ImageIO->GetMetaDataDictionary(), PROPERTY_KEY_TIMEGEOMETRY_TIMEPOINTS, data); }
- Write properties: mitkItkImageIO.cpp; lines 632 - 655
// Handle properties mitk::PropertyList::Pointer imagePropertyList = image->GetPropertyList(); [...] ImageReadAccessor imageAccess(image); LocaleSwitch localeSwitch2("C"); m_ImageIO->Write(imageAccess.GetData());
- Read time geometry: mitkItkImageIO.cpp; lines 348 - 412
// re-initialize TimeGeometry TimeGeometry::Pointer timeGeometry; if (dictionary.HasKey(PROPERTY_NAME_TIMEGEOMETRY_TYPE) || dictionary.HasKey(PROPERTY_KEY_TIMEGEOMETRY_TYPE)) [...] timeGeometry = propTimeGeometry; } image->SetTimeGeometry(timeGeometry);
- Read time geometry: mitkItkImageIO.cpp; lines 348 - 412
for (auto iter = dictionary.Begin(), iterEnd = dictionary.End(); iter != iterEnd; ++iter) { if (iter->second->GetMetaDataObjectTypeInfo() == typeid(std::string)) [...] if (!isDefaultKey) { mitk::CoreServices::GetPropertyPersistence()->AddInfo(info); } } }