Page MenuHomePhabricator

[Segmentation] Add dedicated writer to store multi-label images in nifti
Open, HighPublic


Although it is not possible to save all the information of a multi-label image in the nifti format, it would be good to have a writer that at least guarantees no pixel information is lost. If a user really wants to use a different format than nrrd or dicom, they should be able to do so (in an informed way). So we want a writer that does as well as is possible, together with a warning about which information will be lost when saving this way.

Event Timeline

Expected output:

  • image for each label (file name: use specified name and add label value as suffix; will have no collision in the future as it is guaranteed with T29206 that label values will be unique throughout all groups)
  • json that contains the meta info

Way to go for implementation:

  • New Writer (may be for the start only nifti, but in theory could support all itk image formats)
  • New MimeType (Something like "Exported MultiLabelSegmentation")
  • Refactor (extract) DICOMSegmentationIO::CreateMetaDataJsonFile so that it can also be used be reused by the new writer
  • Refactor (extract) DICOMSegmentationIO::Write Line 159-200 (the code that generates an itk image for each label) so that it can be used by the new writer to generate label images and then directly write them to file.

Remark: It should have a lower rank than our NRRD based MultiLabel writer to ensure the later is used in doubt.

As soon as the writer is available, we should add a not that mitkFileConvert can than also be used to convert/split DICOM Seg or our MultiLabel nrrd into multiple single label images!!! New Feature: :)

floca raised the priority of this task from Normal to High.Fri, Nov 18, 8:04 PM
floca added a project: Next Milestone.
s434n moved this task from Backlog to In candidates on the MITK (v2023.04) board.