While working on a bug that @kompan had with her perfusion data, we came across a problem where a node that contained a ROI (cropped part of an image) showed everything else outside of the ROI as light-green (Colormap mode "Jet", background pixel value = 0).
I did some experiments and here is what I did and what happened (to reproduce):
- open MITK Workbench, load an image (I used Pic3D.nrrd)
- open the segmentation plugin and create a simple segmentation mask
- open the segmentation utilities plugin and perform "image masking" with "zero background value"
- see how a new image node is created that shows the pixel values of the original image under the ROI and gray pixel values as background
- click on the background and verify that the pixel value is actually 0
- right-click on the new image node and select "Jet" and then "Jet Transparent" as colormap
- see no difference in the visualization of both colormaps
- right-click on the new image node and select "Multilabel" as colormap
- see how the background is rendered transparently
- set the colormap mode back to "Grayscale"
- open the properties plugin view and select the new image node
- check the "binary" property checkbox
- see how the background is rendered transparently
- click on the background and verify that the pixel value is still 0
So our question here: Obviously 0 pixel values are not transparently drawn in general but depending on the image type / rendering mode
- in colormap mode "Multilabel" 0 pixel values are rendered transparently
- for binary images 0 pixel values are rendered transparently
- for LabelSetImages 0 pixel values are rendered transparently
However, all three variants are not acceptable for our current scenario since they change the visualization of the pixel values inside the ROI ("Multilabel" colormap does not make any sense, binary images draws everything in the ROI as white).
What is the suggested solution for such a scenario, where an image node shows a ROI but wants to show the underlying image for regions outside of the ROI?