Slice view orientation of oblique/rotated volumes - aligned to volume or anatomical axes?

I have a Sagittal volume (DICOM) that is displayed obliquely in Slicer (because it is an oblique sagittal reconstruction) and it makes perfect sense.

Here is the volume information:

The same image, when converted from DICOM to NIFTI and loaded to SPM is displayed “upright”.

I am wondering if someone can explain this difference in functionality to me. Is there a way I can get this behavior in Slicer?

Thanks in advance!

In earlier Slicer versions, slice views were initialized to be aligned with anatomical axes (as defined when the patient was scanned). In recent Slicer Preview Releases we switched to aligning slice views with voxel arrays because this seems to be what most users expect.

You can switch between the two orientations using slice view controls:

  • choose an anatomical plane using the “Slice orientation” selector to align with anatomical axes
  • click “Rotate to volume plane” button to snap the slice plane to volume axes

In recent Slicer Preview Releases, clicking on the eye icon in Data module automatically rotates to volume plane, unless the features is turned off (by right-clicking on the eye icon and unchecking “Reset view orientation on show”).

Thank you for the helpful explanation! I have a related follow-up question:
When I reformat images as axial, coronal, and sagittal, I see that I can scroll through and view orthogonal slices. But the volume is not really resliced orthogonally - does Slicer have functionality to do this?

Yes, when you scroll the slices they are all resliced along the chosen axis. This can be an arbitrary direction. You can change the direction by showing slice intersections and then Ctrl+Alt+Left-click-and-drag in a slice view.

I see, but I meant that the volume is not resliced orthogonally or my preferred orientation when I export it as a dicom. So it’s not really altering the ras2ijk matrices, but only visually.

Sorry for being unclear in my first question. What I’m trying to achieve is to convert an obliquely acquired volume with a direction cosine matrix not equal to the true Sagittal/axial/coronal orientations to be orthogonally resliced.

Is there a way to do this in slicer?


Yes, sure, you can resample the volume with arbitrary axis directions and create a new volume from that. Probably the simplest is to use Crop volume module and using an ROI box with with axes aligned with RAS axes.

You can also use the ACPC transform module to accurately orient the head into standard orientation (the head orientation on the CT table is just approximately aligned with anatomical axes) and use the computed transform as input in an image resampling module.

This is great! Thank you so much for your help. I noticed that the ROI which is added by default is already aligned with the RAS axes. So I have a two step procedure: 1) Crop the volume 2) ACPC transform to make the alignment perfect.

Here is what I am doing for cropping -

volumeNode = slicer.util.getNode(‘Sagittal resampled’)
roiNode = slicer.mrmlScene.AddNewNodeByClass(“vtkMRMLAnnotationROINode”)

crop_module = slicer.vtkMRMLCropVolumeParametersNode()



And it works mostly as I expect it to. But I have one question: The ijk2ras direction matrices are set to identity for all my volumes after cropping. So if I start with a volume like this:

Why does the ijk2ras get reset to identity instead of [[-1,0,0],[0,-1,0],[0,0,1]]?

Also, I know this is minor - but I am so grateful to the people of Slicer development for having added a human orientation marker which adjusts itself according to the oblique acquisition matrices. It really helps beginners like me.


There are 24 ways of choosing origin and axis directions (IJKtoRAS matrix) and reorder voxels in memory that results in having the same voxels at the same physical location. They are all equivalent.

The simplest IJKtoRAS mapping is identity matrix (diag(1,1,1,1)). However, IJKtoLPS mapping is used the most commonly in files, therefore a trivial IJKtoLPS mapping ends up as diag(-1,-1,1,1) when imported into Slicer.

If you need a specific geometry then you can use the image resampling modules (you can specify geometry using a reference volume, transform, or axes directions&origin&extents).

1 Like

Makes sense, I defined a transform and set the ijk2ras matrices after that. Thank you for your help with this!

Hi Andras,

I have a follow-up question here. My workflow currently crops the volumes with ROIs aligned to the RAS axes, computes the ACPC transform, and then resamples the cropped volumes. I noticed that an offset (arrow in the image below) is introduced between the coronal and sagittal volumes after the transformation. Could you please help explain this? I have already tried specifying the AC as rotation point in the rigid/affine parameters section of the resample scalar/vector/dwi volume - the offset is still visible.

Strangely, this is the case with only some of the scans I have.

I also noticed that if I apply the ACPC transform first, from the transforms module, harden it, and then crop the volumes, this issue does not arise.


Can you share (upload somewhere and post the link here) an anonymized data set that has this issue?

Unfortunately, I’m not able to share the anonymized data. I understand if we cannot proceed without it.

Does it make sense to apply, harden acpc transform, and crop volume instead of what cropping first and then resampling with the acpc transform?

The ACPC transform is just a linear transform so it will not decrease the image quality, so if you find that hardening it improves the results then it should be fine to do it.

There are huge public brain MRI databases, so if you want us to investigate this difference in the border then you may try to reproduce it with a data set taken from those.

1 Like