Page MenuHomePhabricator

Region growing fails in Coronal window
Closed, ResolvedPublic

Description

Make a new segmentation of an image, select the segmentation as working data and the original image as reference, open region growing tool and click in coronal window, nothing happens.... (saggital and axial works)

Whats also interresting:
When i click very often and fast into the coronal window my mouse pointer suddenly "beams" onto my second screen without moving my mouse, lol. Scotty, please do not beam my mouse pointer....

Event Timeline

Resetting all bugs without active assignee flag to "CONFIRMED". Change status to IN_PROGRESS if you are working on it.

Andreas: Resetting the change flag, because...

This bug depends on T7079, which Marco denied without a comment. Since he in on vacation, I cannot ask him for his reason. If this urgent, we can discuss it next Tuesday after the MITK meeting.

Yes this is urgent because both the regiongrower and the 2D sliceinterpolation is not working for the coronal view.

I worked together with Bastian on T7079 and I know why he denied the core modification flag.

We can discuss that next tuesday.

I need the fix soon too. It is quite important.

Ok, we discussed this issue. Whatever the fix does is fine. However, please schedule an appointment with Marco, me, and others who are interested in what we do with this 0.5-pixel-offset issue. We need a clear and documented concept for that, along with a number of simple test. Otherwise, this issue will be coming up every other (half) year

As it seems the fix we had didn't work for some images. So we had to look over this bug today again.

But the good news is that we found the error. In the RegionGrower before region growing is started it is checked whether the clicked worldposition lies within the selected slice image. For this verification this wrong point was taken:

First the worldposition was transformed into 3D index coordinates. This coordinates then are rounded to 2D index coordinates. Originally the 3D index coordinates were used for the check. Because of T7079 the geometry of the 2D slice is shifted and that leads to a wrong result for the check.

We now changed it so that the 2D point is used now and that works.

So we fixed this bug without changing the geometries.
I removed the dependency to T7079 so that I can close this bug.

[00503d]: Merge branch 'bug-7534-Regiongrowing-fails-in-coronal-window'

Merged commits:

2011-08-24 14:23:12 Andreas Fetzer [aeac22]
Old fix didn't work. We made another one. In the RegionGrower a wrong point
was used to check whether the clicked world position lies inside the selected
slice image.


2011-08-10 16:55:09 Andreas Fetzer [f0f08d]
Regiongrower is now working also in coronal window

This bug is strongly related to T7079. The cause is that the geometry of the
2D slice obtained by the ExtractImageFilter is wrong.

Because of that the current (clicked) worldposition is transformed into index
coordinates incorrectly. The RegionGrower then checks whether the index coordinates
lie within the current 2D slice. This is not so for the coronal window.
As a result of that the regiongrower calculated the wrong last screenposition.
This causes the strange cursor behaviour.

We now changed again (as in T7079) the initialization of the PlaneGeometry
for the extracted slice. If the Geometry3D based on which the PlaneGeometry should
be created is an image geometry then the 0,5 offset is substracted from the new
origin.

Our change is:

If we are considering the x,y-plane then 0,5 should only be substracted from
the x and y coordinate and NOT from the z component.

If we are considering the y,z-plane then 0,5 should only be substracted from
the y and z coordinate and NOT from the x component. Analoguos for the x,z-plane.

We tested all tools in all windows and even the slice interpolation. It all
seems to work fine.

Reopening in order to remove a MITK_INFO