Page MenuHomePhabricator

Image Cropper handles missing in 2D (non-axes-aligned image)
Closed, WontfixPublic

Assigned To
None
Authored By
maleike
Jun 12 2018, 2:26 PM
Tags
Referenced Files
F1096039: 10x20x30.nrrd
Jun 25 2018, 12:28 PM
F1096041: grafik.png
Jun 25 2018, 12:28 PM
F1096044: grafik.png
Jun 25 2018, 12:28 PM
F1082569: grafik.png
Jun 12 2018, 2:27 PM

Description

With non-axes-aligned images (as current in MRI), the 2D rendering of mitk::BoundingShapeVtkMapper2D seems to have a bug. Handles are not drawn or not drawn inside the visible part of the world. I did not dig into the code yet.

Event Timeline

kislinsk triaged this task as Normal priority.
kislinsk added a project: Restricted Project.
kislinsk added subscribers: thomass, kislinsk.

It seems that it is somehow dependent on the data whether the handles work or not.
Just today I run into the same problem so you were a bit faster ;) I will have a look.

@thomass : thanks, that would be great! I just stumbled upon that but won't find the time to analyze the problem (plus the code was a bit lengthy and looked kind of redundant with the 3D mapper's code)

Non-axis aligned images should give a warning that you need to reinit them first. The problem is that handles for

  • non-axis aligned images
  • images in which you rotate the crosshair

are not shown on rotated 2D views because the handles would appear at random positions in 2D. In that case you need to either do a reinit or use the (not so handy) 3D view.

@maleike Have you tried reinit? If that doesn't work, can you provide us with an example?

Thanks for looking into this. I just generated a non-axes-aligned image for testing:

By default (global reinit) handles are missing in most 2D slices:

grafik.png (752×1 px, 26 KB)

After reinit the display is fine:

grafik.png (770×1 px, 36 KB)

The reinit option is good to know/have but only accessible to users that are already familiar with this concept.

I see your point, however right now we can't come up with a clean solution so that 2D handles make sense if the axes are not aligned.
One possible solution could be to enforce a reinit like it is currently done in the segmentation plugin.

I think your idea to add a short notice to Image Croppers UI would already help with the problem. An additional 'reinit' button could also help. However, I would argue against an 'enforced' reinit because this would come as a surprise to the user, potentially unnoticed (objects outside the image would just disappear making some users doubt their perception ;-)

I vote for the UI notice + Reinit Button and against an enforced reinit. If the handles can't be displayed, both the notice and the button should appear but being hidden when it isn't necessary.

We added some code to identify two cases:

  1. Non-aligned image geometry
  2. View and image are not aligned after cross hair rotation

We now display two individual warnings hinting at the option for a reinit so that handles are shown correctly.
However, there has been some discussion going on about whether a standalone reinit button is adding redundant functionality.

kislinsk removed thomass as the assignee of this task.
kislinsk added a project: Auto-closed.

Hi there! 🙂

This task was auto-closed according to our Task Lifecycle Management.
Please follow this link for more information and don't forget that you are encouraged to reasonable re-open tasks to revive them. 🚑

Best wishes,
The MITK devs