Page MenuHomePhabricator

StatusBar info is dependent on the pointer position, not on the crosshair / mouse click
Closed, ResolvedPublic

Description

When using the mouse scrolling, the statusbar information is not reflecting the values under the crosshair but under the pointer. That means, that if you move your mouse somewhere around the image and scroll, you will not get the new updated status information at the location where the crosshair is (the crosshair does not change its position when scrolling).

To reproduce:

  1. open MITK workbench, load an image (I tested Pic3D and Brain)
  2. make sure that the image is reinitialized to its center position (usually the case when a new image is loaded)
  3. move your mouse pointer to any location inside of the image and scroll a few slices
  4. observe how the slice number / position / index increases or decreases, depending on the scroll direction
  5. observe how the pixel value probably stays close to the previous pixel value
  6. move your mouse (without doing anything else) to a different position on the screen / render window
  7. scroll again and see how the slice number / position / index changes drastically
  8. observe how the pixel value probably changes drastically

Event Timeline

This is probably caused by DisplayActionEventBroadcast (was DisplayInteractor before).

That is interestingly related to a problem I'm also facing while working on the MxNMultiWidget: How can I recalculate the crosshair-position if a mouse-wheel / slice-scroll event was sent. So basically the last crosshair position needs to be transformed to index coordinates, then the current slice position of that render window needs to be used / vector entry needs to be replaced and the the index coordinates can be transformed back again into world coordinates.
However, I was wondering which geometry needs to be used for that: Currently I have the problem that the axial-view is flipped and my transformed coordinates do not match the coordinates on the screen (while working on {T26208}).

I think this ultimately leads to these two tasks: T25105: UpdateStatusBar duplicates business logic and T19470: Cleanup DisplayInteractor with the goal to remove the UpdateStatusBar-function completely from the mentioned classes and handle the events correctly, e.g. inside the SliceNavigationController or similar. Not only would this remove the mentioned redundancy of the function but also take away the responsibility for updating from the mentioned classes and give it to a more related class.

Additionally I found out that the order of the pixel-position and the index do not match, see screenshot (taken with MITK 2022.04 Release, using Pic3D and brain):

pic3d_indices.png (1×1 px, 198 KB)

brain_indices.png (1×1 px, 254 KB)

Explanation:

  • the worldposition (mm) of the Image Navigator (in colored boxes) match the first entry "Position" of the status bar info
  • the image indices of the Image Navigator match the second entry "Index" of the status bar info, but are written in a different order
    • however, the order is not in line with the worldposition

--> green corresponds to sagittal, which is the second slider and the first entry of the world position / index
--> blue corresponds to coronal, which is the third slider and the second entry of the world position / index
--> red corresponds to axial, which is the first slider and the third entry of the world position / index

So basically everything seems to be correct but it is confusing as we typically "count" (axial, sagittal, coronal). We should design the layout correspondingly.

kislinsk triaged this task as Normal priority.Sep 14 2022, 5:42 AM
kalali claimed this task.

All related tasks have been resolved so we can close this task as well. The "issue" still remains but we are exploiting it on purpose now using the changes made in {D686}, to show pixel information dynamically (position under the mouse cursor) in the status bar.
With the changes made in {D749} we now have the possibility to explicitly show image pixel information for the crosshair position in the newly introduced pixel value view.