Deleted branch from rMITK MITK: bugfix/T28657-FixMSVCv16.11WarningsAsErrors.
that is at least one of the two code locations I assume to make problems. (The other one is when the interpolation results are written back to the segmentation)
For now, I wouldn't try to patch in multi-label support into the interpolation class. Instead I would ensure that only a label image (so an image that just contains the active label) is passed to the interpolation class.
I think that that is the most pragmatic approach to it, procure the current implementation will never work properly when multiple labels are present, due to the assumptions already stated by @kalali.
Mon, Aug 2
That is what I assumed... the labels created by multi-label plugin always contain only two values, if I am not mistaken: 0 and x with x e [1,2,3,...]. One could check for the label values and if there is only two different ones, use these two. This does not include the case when a label was created externally,e.g., by U-Net and contains several values in a single image.
Ok I think I found something odd:
In mitk::ShapeBasedInterpolationAlgorithm::ComputeDistanceMap there are two lines (92 / 93), where the invert filter input is defined with
The cause for this problem lies in missing state-transitions of the interaction state-machine. DisplayConfigPACS.xml defines the events based on which the state-machine in DisplayInteraction.xml acts. For modifier-based interactions, a MousePressEvent / MouseReleaseEvent in combination with a modifier-key are responsible to transition into / out of the corresponding state ("move", "zoom", ...). When the modifier-key is released BEFORE releasing the mouse button, the second event is never triggered, causing the state machine to get stuck in that specific state, which blocks most other interactions.
Tested it on Windows. I can confirm what @kalali said.
Ah ok, thx. I will try later.
Sun, Aug 1
Sat, Jul 31
Fri, Jul 30
oops, sorry. than I have mixed something up.
Is this task still valid? If I try what's written in the description (after showing the interpolation widget), nothing happens, not even on the first label.
@kalali Aren't you already working on that topic? I thought, i just reviewed something in that direction?!?
Ok I don't really understand how to work with the ExtractSliceFilter and how to replace what's currently done inside PlanarFigureMaskGenerator::CalculateMask(). Maybe someone can help and explain the different usages of ExtractSliceFilter and ExtractImageFilter and how to correctly set the desired slice for the slice filter.
I just realized that PlanarFigureMaskGenerator is still using the ExtractImageFilter from this module. Other classes use ExtractSliceFilter (which is the recommended version). So in order to remove the ImageExtraction-module, I will replace the filter inside PlanarFigureMaskGenerator.