pyushkevich / itksnap

ITK-SNAP medical image segmentation tool
http://www.itksnap.org
GNU General Public License v3.0
294 stars 86 forks source link

Oblique volumes not displayed correctly with respect to anatomical axes #27

Closed lamyj closed 3 years ago

lamyj commented 3 years ago

Summary When loading an oblique volume (in this example, the Euler angles of the oblique volume given by ITK are 18°, -22°, -10°), it is displayed as axis-aligned when loaded as main image. On the two snapshot below, the skull-stripped image is oblique, while the other one has an identity direction matrix.

Observed behavior In the first snapshot, the axis-aligned image is loaded first, and the oblique image is displayed correctly.

snapshot0001

In the second snapshot, the oblique volume is loaded first, it is displayed axis-aligned, while the axis-aligned volume is displayed as if it were oblique.

snapshot0002

Expected behavior I would have expected both screenshots to show the images in the same orientation.

pyushkevich commented 3 years ago

Multiple images are displayed based on their physical coordinates. So if the images have the same dimensions (e.g., 64x128x256) but different headers (e.g., one with identity matrix, another with a rotation), they will be shown as you see, differently. The display axes are aligned with the main (first) image that is loaded.

If your two images should be in the same space, then the solution is to modify the header of one of the images. You can use c3d -copy-transform command to do this.

I hope that helps! Paul

On Thu, Feb 4, 2021 at 12:41 PM Julien Lamy notifications@github.com wrote:

Summary When loading an oblique volume (in this example, the Euler angles of the oblique volume given by ITK are 18°, -22°, -10°), it is displayed as axis-aligned when loaded as main image. On the two snapshot below, the skull-stripped image is oblique, while the other one has an identity direction matrix.

Observed behavior In the first snapshot, the axis-aligned image is loaded first, and the oblique image is displayed correctly.

[image: snapshot0001] https://user-images.githubusercontent.com/4102070/106932111-9d8b6880-6717-11eb-9d03-d166b73aa908.png

In the second snapshot, the oblique volume is loaded first, it is displayed axis-aligned, while the axis-aligned volume is displayed as if it were oblique.

[image: snapshot0002] https://user-images.githubusercontent.com/4102070/106932117-9fedc280-6717-11eb-9d88-cc8995dd024f.png

Expected behavior I would have expected both screenshots to show the images in the same orientation.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/pyushkevich/itksnap/issues/27, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJPEW5GPDFGQWWLJAKZW7LS5LL4HANCNFSM4XDIBUCQ .

-- Paul A. Yushkevich, Ph.D. Professor of Radiology Penn Image Computing and Science Laboratory University of Pennsylvania Perelman School of Medicine

lamyj commented 3 years ago

Thanks for the explanation !