Page MenuHomePhabricator

Enable DICOM SEG conversion for nrrd segmentations
Open, NormalPublic

Description

The following workflow should be possible. One reason is that a user who accidentally saves manual segmentation work as nrrd , though needs DICOM SEG, it should be possible to fix.

  1. Load image data in DICOM format
  2. Perform manual segmentation
  3. Save segmentation as nrrd
  4. Restart MITK Workbench
  5. Load DICOM image from step 1, load nrrd file from step 3
  6. Save as valid DICOM SEG

Event Timeline

This comment was removed by metzger.

NOT READY FOR MASTER!

Already add serialization of properties marked as persistent to the multilabel nrrd writer. Also copied the code from image nrrd file reader to get all properties while reading a nrrd image (not nice but works). But testing was only for one use case. So looking for side effects before merging this commit (6f1b022e7b8d) into master.

The second commit is to syn the referenceFiles property while reading the nrrd file. I think that is not necessary, if the serialization of StringLookupTableProperty works properly. In the future we shoul get rid of this property anyway.

Some hints for this use case:

  1. Select the "MITK DICOM Reader v2 (autoselect)" default
  2. Select Multilabel nrrd writer not default! DICOM is default
  3. Select Multilabel nrrd reader default
metzger added a subscriber: metzger.

NOT READY FOR MASTER!

Already add serialization of properties marked as persistent to the multilabel nrrd writer. Also copied the code from image nrrd file reader to get all properties while reading a nrrd image (not nice but works). But testing was only for one use case. So looking for side effects before merging this commit (6f1b022e7b8d) into master.

T25988: LabelSetImageIO should support time geometries and property serialization copes partially with the same problem and shows what have to be done to allow LabelSetImageIO store all relevant informations into NRRD (and load them again).

I don't know the status of the branch above as it is dangeling arround for quite some time.

But if this task should be done in a sound way (as @metzger proposed above) we should do the following / build upon other tasks (because lot of the problems must also be solved to handle rewriting of DICOM SEG (T26953)):

  1. T26951: DICOM SEG - DicomSegIO should just use properties of the passed segmentation object
  2. T26952: Implement helper to correct (DICOM conformal) set the properties of a segmentation (DICOM SEG) and use the helper where ever we generate segmentations.
  3. T25988: LabelSetImageIO should support time geometries and property serialization

Then it should do the trick. ;)