Read Prostate MR image failed

Operating system:Windows 64 bit
Slicer version:4.8.1
Expected behavior:


Actual behavior:

Hello, i am trying to read a prostate image by 3D slicer, however, when i open it, it seems some of the images is not complete and the rotation looks like being mistake, so i wonder if there are some solutions for that.
Thanks a lot.

This looks perfect. MRI images are often acquired with orientation that is not aligned with anatomical axes.

If you prefer, you can adjust slice views from the default (anatomical) orientation to image acquisition axes orientation: open slice view controller, click double-arrow to show more options, click views link, and click Rotate to volume button.

image

1 Like

Really appreciate for your help.
Well, the MR image display seems work well, however, I also want to annotate the ROI region and get the center coordinates of the region and export them for future research (deep learning analysis et.). I have tried this module, and the exported coordinates(red rectangle, voxel coordinate) is just as below:
image
I use the SimpleItk (python) to convert the voxel coordinate to world coordinate, the code is just as :
image
The world coordinate by using SimpleItk is (88,-35,31), but in fact the true world coordinate is :
image

So i am confused where i am wrong, or some other ways to directly export the right world coordinates ?
Thanks a lot.

The code snippet above ignores image orientation and therefore the computed physical coordinates are incorrect. The world_xyz computation formula looks suspicious, too (you cannot subtract physical coordinates origin_xyz from voxel coordinates center_xyz). You either need to fix the formula (it would be something like origin_xyz + voxel_ijk * spacing * direction) or use TransformIndexToPhysicalPoint method (or one of its variants).

Also note that Slicer uses RAS as world coordinates, while ITK uses LPS (so you may need to multiply physical coordinates by diag(-1, -1, 1, 1) matrix), and if you access arrays in numpy then you may also need to deal with Fortran/C index order.

1 Like

Thanks a lot for your help.

Anyway, what is the meaning of the operation ’ rotate to volume plane’, I have many other MR images to handle, and I want to process these image previously by a script.
I wonder if there are some script function in SimpleITK to do this operation in bulk.

Reorient slice views to match direction of image axes.

All operations that you can do on the GUI are available from Python - some of them use MRML library, some use module logic, and some may be accessible using SimpleITK. We can give more specific advice if you tell what operations you plan to do.

Hello, is there any example codes of ‘rotate MRI images to volume plane’ operation by python, can you show me some examples, thank you.

See this code snippet in the script repository:

https://www.slicer.org/wiki/Documentation/Nightly/ScriptRepository#Rotate_slice_views_to_volume_plane

Hi , How to save the transformed (‘rotate to volume plane’ ) volume in GUI?
I have tried the "rename the current volume’’ and then save it, however when i open it again it seems that the transformed volume not changed.
image

Meanwhile, i also want to save the plane by python, the code is as below in .slicerrc.py , and i want to know how can i get the transformed volume and save it through python.
image

“Rotate to volume plane” rotates slice view plane to match orientation of volume axes. The volume is not transformed. Why would you like to rotate the volume?