Page MenuHomePhabricator

LabelSetImageIO should support time geometries and property serialization
Open, HighPublic


Current status:

  1. 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.
  2. 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)


        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");
  • Read time geometry: mitkItkImageIO.cpp; lines 348 - 412
// re-initialize TimeGeometry
TimeGeometry::Pointer timeGeometry;


    timeGeometry = propTimeGeometry;

  • Read time geometry: mitkItkImageIO.cpp; lines 348 - 412
  for (auto iter = dictionary.Begin(), iterEnd = dictionary.End(); iter != iterEnd;
    if (iter->second->GetMetaDataObjectTypeInfo() == typeid(std::string))


      if (!isDefaultKey)

Event Timeline

floca created this task.Feb 5 2019, 11:02 AM
kislinsk edited projects, added MITK; removed MITK (2018-04).Mar 11 2019, 9:32 AM
kislinsk triaged this task as High priority.Mar 15 2019, 11:30 AM
kislinsk removed a project: Request for Discussion.
kislinsk added a subscriber: kislinsk.

This is important to be fixed soon-ish. Potential candidate for the next bugfix release.

hettich renamed this task from LabelSetImageIO should support time geomatries and property serialization to LabelSetImageIO should support time geometries and property serialization.Mar 22 2019, 5:33 PM
floca updated the task description. (Show Details)Apr 29 2019, 9:42 AM