Page MenuHomePhabricator

Closing program and reloading projects causes a complete mis-assignment of all segmentations
Closed, WontfixPublic

Assigned To
Authored By
daniel.frenzel
Nov 21 2017, 2:07 PM
Referenced Files
F909945: grafik.png
Nov 23 2017, 5:28 PM
F909274: Capture2.PNG
Nov 22 2017, 5:28 PM
F909272: Capture.PNG
Nov 22 2017, 5:28 PM
F909216: grafik.png
Nov 22 2017, 2:55 PM
F909213: grafik.png
Nov 22 2017, 2:55 PM
F909211: grafik.png
Nov 22 2017, 2:55 PM
F909160: test.mitk
Nov 22 2017, 1:11 PM
F909087: Capture.JPG
Nov 22 2017, 10:14 AM

Description

It is not possible to reliably interpolate segmentations after the project gets reloaded.
E.g. if I want to generate an interpolation for the jar, the program generates one for the brain.
In the worst case I just get such an error message

grafik.png (598×1 px, 292 KB)

Event Timeline

daniel.frenzel renamed this task from Closing program and reloading a projects causes a complete mis-assignment of all segmentations (rendering MITK useless) to Closing program and reloading projects causes a complete mis-assignment of all segmentations (rendering MITK useless).Nov 21 2017, 2:17 PM
daniel.frenzel updated the task description. (Show Details)
daniel.frenzel updated the task description. (Show Details)
daniel.frenzel renamed this task from Closing program and reloading projects causes a complete mis-assignment of all segmentations (rendering MITK useless) to Closing program and reloading projects causes a complete mis-assignment of all segmentations .Nov 21 2017, 2:30 PM

Thanks for reporting. What version of MITK are you using? I can't reproduce with MITK 2016.11. I created three slice segmentations in the three main axes, clicked on 3d-interpolation to get a preview, and validated the feedback surface. I saved the project, closed it, and re-opened it again. Clicked on 3d-interpolation ➡️ Reinit interpolation and got the same surface feedback surface.

edit: Also works when closing the Workbench before opening the project again.

Capture.JPG (612×839 px, 58 KB)

Thanks for reply. I created a very simple example project which was able to reproduce the problem on two Installations.
I was not able to create a 3D interpolation with this file for 4 out of 5 segmentations. The one which worked was mis-assigned.
The MITK Version is 2016.11.

This is because the helper nodes containing the drawn contours are missing. To see helper nodes in the Data Manager, check WindowPreferences...Data ManagerShow helper objects. I guess somewhere in your workflow you lost them unconsciously.

Maybe it is the intention of MITK to abandon all helper objects when saving the project.

Before Save/Reload

grafik.png (364×602 px, 202 KB)

After Reload

grafik.png (364×602 px, 185 KB)

So I tried to save one of them separately. Unfortunately, I seem to be unable to assign it with one of the contours :/

grafik.png (1×1 px, 588 KB)

Yes. To be precise, data nodes with the property "helper object" are not written to the scene file as they represent a temporary concept, but data nodes with the property "hidden object" are written to the scene file. It is not the "Position i" nodes you are looking for, but the "Drawn contours" nodes. These nodes are generated only when the 3-d interpolation is activated. So to be able to use your contours later in a 3-d interpolation, be sure to activate the 3-d interpolation for the segmentations before you save your project.

Before reload:

Capture.PNG (165×311 px, 9 KB)

After reload:

Capture2.PNG (97×309 px, 4 KB)

Does this mean, that I can throw away my contours as soon as I switch off the 3D interpolation feature and save the project? Because running an interpolation becomes very slow if I have several contours.

I also think, this approach is not very intuitive.
I guess, the reason for this was the possibility to confirm an interpolation and save the result somehow without the need for later interpolations.
However, this fails if one decides to continue to add further contours to a label, because then the "missing contours message" will spawn when you need to interpolate again.

I believe, the user-expected behavior would be that MITK just saves the hidden objects and allows to continue work even with disabled interpolation. So that one can continue at every moment and does not have to deal with massive slow downs when the project grows.

You're right, it isn't intuitive but the 3-d interpolation wasn't implemented with the requirement to continue interpolation sessions. It was a feature request later that triggered the implementation to continue in later session by providing the drawn contours. However, 3-d interpolation isn't used by most users and as you noticed it can get rather slow with many contours, so the "Drawn Contours" is only generated if really needed. That's why it is only generated when the interpolation is activated. The interpolation then traverses the "Position i" nodes to gather them in the "Drawn Contours" node. As the "Position i" nodes are not saved for the reasons I mentioned before, this doesn't work if you activate the interpolation for the first time AFTER the reload. You may work around this for now by leaving the interpolation deactivated and only activate it before saving the scene to get a "Drawn Contours" node. Then you can continue later on without slowing down the manual contouring.

All I can say for now is that we are currently working on a completely rewritten segmentation to solve all the issue we have with the current segmentation tools. One goal is to always save the user drawn contours which lead to a segmentation. So in the future it will be possible to interpolate whenever you want. This work will take some time, though. It's scheduled for 2018.

I noticed that there is always only one "Drawn Contour" object stored in the first Label. So after Reload the interpolation works only for the first label.

grafik.png (226×240 px, 6 KB)

Anyway, I wonder what is the right workflow then. I initially thought that the interpolation is only used at the very end where I press confirm and the final segmentation is generated.
Some organs like the skull are rather complex and a correct interpolation is maybe just generated after a few days.
If reloading interpolations does not work on bigger projects, one is forced to use confirm interpolations on small sub-segments before saving the project.
This is a bad idea, because one can hardly modify/correct them later. Consequently, the best workaround seems to save projects with contours enabled with just one label :/

Anyway, thanks for the answer

Btw.: I just noticed the program crashes sometimes on "close project".

In that case 3-d interpolation might not be the best choice as its strength are "potato"-shaped organs which can be segmented surprisingly accurate with like half a dozen of contours, which is a task usually done in 2-3 minutes and doesn't need multiple sessions to complete. Anyways, everything is supposed to be awesome with the new segmentation next year. 😄

I close this report with Wontfix, but be assured that persisting contours is a feature we have definitely in mind for next year.