Page MenuHomePhabricator

Meaning of 2D images in MITK
Open, NormalPublic


As the topic came up in D338#inline-3026 I want to discuss the meaning of 2D images (and especially 2D segmentation).

  • What does 2D actually mean in MITK? 3D with one slice in the third dimension? Real 2D with only two dimensions?
  • Is it mixed in the code base?
  • Do we always need to check if there is a third dimension, if we only want to handle "real" 3D and 4D images?
  • Do our algorithms support real 2D images?

Event Timeline

floca triaged this task as Normal priority.Oct 2 2020, 8:37 AM

Many years ago it was decided that we handle 2d images as 3d images with a single slice. While not correct as the pixel spacing in z-direction is completely made up, it reduced some code and edge cases and was found to be an okay-ish simplification. On the other hand it rarely leads to issues that were found to be worth having them as the reduced code and edge cases gave way more benefits in comparison. One reason for this discussion in the first place was the segmentation btw as additional 2d cases regularily broke even more code than all the 4d cases. So eventually it was said, that it will be kind of guaranteed that loaded images will be presented at least as 3d images. It is still possible to generate 2d images in code and that's why there still should be checks if an image has less than 3 dimensions.