Page MenuHomePhabricator

Geometry Problem - Images are Misaligned
Closed, WontfixPublic

Assigned To
None
Authored By
clarkson
Oct 26 2013, 2:13 PM
Referenced Files
F1077: screenshot-high-res-geometry-showing-low-res-BAD.tiff
Oct 26 2013, 2:18 PM
F1076: screenshot-high-res-geometry-OK.tiff
Oct 26 2013, 2:17 PM
F1075: screenshot-low-res-geometry-showing-high-res-data-OK.tiff
Oct 26 2013, 2:16 PM
F1074: screenshot-low-res-geometry-OK.tiff
Oct 26 2013, 2:16 PM
F1073: test_image_high_res.nii.gz
Oct 26 2013, 2:15 PM

Description

I attach two test images, one low res (test_image_low_res.nii), one high res (test_image_high_res.nii), with different pixel sizes and different extent (field of view).

If I select the low res one, and do a re-init (not Global re-init), the geometry matches that of the low resolution image. The pixel indexes range between 0 and 4 in all 3 dimensions. If I select pixel 4,2,3, the low res image value is 0.31 and the high res image value is 2.51e-03. (screenshot-low-res-geometry-OK.tiff) The point here is that the centre of the low res voxel (4,2,3) is aligned with the centre of the high res voxel (43, 33, 38) (screenshot-low-res-geometry-showing-high-res-data-OK.tiff)

If I now do a re-init on the high res image, or indeed do a Global re-init, the geometry matches that of the high res image. There are 64 pixels in each direction, with indexes 0-63. If I navigate to pixel 43, 33, 38, the pixel intensity at that point in the high res image is still 2.51e-03 (i.e. I have selected the correct voxel) (screenshot-high-res-geometry-OK.tiff), but now the low resolution image is not rendered in the correct position. It is misaligned. (screenshot-high-res-geometry-showing-low-res-BAD.tiff).

Please can this be fixed?

Many thanks

Matt

Event Timeline

clarkson added a subscriber: clarkson.

high resolution test image

screenshot 1

screenshot 2

screenshot 3

screenshot 4

Looks like adding the attachments hides the file names.
The screenshots were attached in the same order they are described.

I personally would consider this high priority, as a key point of an image viewer is to render things in the correct place. Hence I set it to high/major.

Thanks

Matt

And before I forget:

This issue is not related to any recent Geometry refactoring. It has existed for some time. It was reported by our users in July, but we were running an old version of MITK, so I left it until we had completed our ITKv4 upgrade work.

Hope that helps.

Matt

Basti, could you give me your opinion on this? It is how it used to be? Is it a new issue?

I doubt it's a rendering problem, since we did not change anything therein months.

i am having a look at this issue

Christoph and I are going to investigate this issue.

This is known issue which is caused by the way how images are rendered. The images internally are resized to match the whole world geometry area. This may lead to an offest of the origin, if the spacing of the image does not allow to set the origin as intended. (e.g. for the given images, 5 hidden voxel are drawn and therefore the origin of the low res image is at 25/25/25 instead of 23/23/23)

A solution for this bug is to enable the property "in plane resample extent by geometry" to true. In this case the image is resampled to the world geometry. The offset of the images vanish, but there may be resampling artefact's. They are not visible in the given example since spacing of 5 can perfectly resampled with spacing of 1.

A better solution is to add a switch to allow the 2D render windows to use the original images without resampling. I'll add a new bug for this feature.

Thanks michael!

Your solution with the switch sounds great!! We should definitly do that

kislinsk added a project: Bulk Edit.
kislinsk removed a project: Bulk Edit.