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

**URL:** <https://discourse.slicer.org/t/slice-view-orientation-of-oblique-rotated-volumes-aligned-to-volume-or-anatomical-axes/20092>\
**Category:** Support\
**Created:** [October 11, 2021, 5:15am UTC](https://discourse.slicer.org/t/slice-view-orientation-of-oblique-rotated-volumes-aligned-to-volume-or-anatomical-axes/20092 "2021-10-11T05:15:32Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sharada](https://avatars.discourse-cdn.com/v4/letter/s/ba8739/32.png) [@Sharada](https://discourse.slicer.org/u/Sharada)\
**Post date:** [October 11, 2021, 5:15am UTC](https://discourse.slicer.org/t/slice-view-orientation-of-oblique-rotated-volumes-aligned-to-volume-or-anatomical-axes/20092/1 "2021-10-11T05:15:32Z")

</div>

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

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/c/1/c1cb35c2c213b1746a1af570a3bb648e0b061d5c.jpeg)  
Here is the volume information:  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/7/3/73ad18ffbb7bb51cddd3a13c6f64e20753de3128.png)

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

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/d/c/dca949d72ee7ac26ce495bc2c91102fd27b15a73.png)

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!

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [October 13, 2021, 2:56am UTC](https://discourse.slicer.org/t/slice-view-orientation-of-oblique-rotated-volumes-aligned-to-volume-or-anatomical-axes/20092/2 "2021-10-13T02:56:06Z")

</div>

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](https://slicer.readthedocs.io/en/latest/user_guide/user_interface.html#slice-view):

- 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”).

---

<div class="post-metadata">

**Author:** ![Sharada](https://avatars.discourse-cdn.com/v4/letter/s/ba8739/32.png) [@Sharada](https://discourse.slicer.org/u/Sharada)\
**Post date:** [October 16, 2021, 7:05pm UTC](https://discourse.slicer.org/t/slice-view-orientation-of-oblique-rotated-volumes-aligned-to-volume-or-anatomical-axes/20092/3 "2021-10-16T19:05:15Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [October 17, 2021, 12:20am UTC](https://discourse.slicer.org/t/slice-view-orientation-of-oblique-rotated-volumes-aligned-to-volume-or-anatomical-axes/20092/4 "2021-10-17T00:20:03Z")

</div>

> [@Sharada](#):
>
> 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.

---

<div class="post-metadata">

**Author:** ![Sharada](https://avatars.discourse-cdn.com/v4/letter/s/ba8739/32.png) [@Sharada](https://discourse.slicer.org/u/Sharada)\
**Post date:** [October 17, 2021, 12:48am UTC](https://discourse.slicer.org/t/slice-view-orientation-of-oblique-rotated-volumes-aligned-to-volume-or-anatomical-axes/20092/5 "2021-10-17T00:48:26Z")

</div>

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?

Thanks,  
Sharada

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [October 17, 2021, 1:50am UTC](https://discourse.slicer.org/t/slice-view-orientation-of-oblique-rotated-volumes-aligned-to-volume-or-anatomical-axes/20092/6 "2021-10-17T01:50:03Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Sharada](https://avatars.discourse-cdn.com/v4/letter/s/ba8739/32.png) [@Sharada](https://discourse.slicer.org/u/Sharada)\
**Post date:** [October 17, 2021, 11:51pm UTC](https://discourse.slicer.org/t/slice-view-orientation-of-oblique-rotated-volumes-aligned-to-volume-or-anatomical-axes/20092/7 "2021-10-17T23:51:41Z")

</div>

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()  
slicer.mrmlScene.AddNode(crop\_module)

crop\_module.SetInputVolumeNodeID(volumeNode.GetID())  
crop\_module.SetROINodeID(roiNode.GetID())

slicer.modules.cropvolume.logic().FitROIToInputVolume(crop\_module)  
slicer.modules.cropvolume.logic().Apply(crop\_module)

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:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/f/d/fdd54833bc71c13c7b3ab37423d2c75fcc1e3262.png)

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

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/5/0/50d54d900e12eca63635813532401bb80603d371.png)

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.

Best,  
Sharada

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [October 18, 2021, 12:08am UTC](https://discourse.slicer.org/t/slice-view-orientation-of-oblique-rotated-volumes-aligned-to-volume-or-anatomical-axes/20092/8 "2021-10-18T00:08:45Z")

</div>

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).

---

<div class="post-metadata">

**Author:** ![Sharada](https://avatars.discourse-cdn.com/v4/letter/s/ba8739/32.png) [@Sharada](https://discourse.slicer.org/u/Sharada)\
**Post date:** [October 18, 2021, 12:41am UTC](https://discourse.slicer.org/t/slice-view-orientation-of-oblique-rotated-volumes-aligned-to-volume-or-anatomical-axes/20092/9 "2021-10-18T00:41:07Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Sharada](https://avatars.discourse-cdn.com/v4/letter/s/ba8739/32.png) [@Sharada](https://discourse.slicer.org/u/Sharada)\
**Post date:** [October 26, 2021, 10:17am UTC](https://discourse.slicer.org/t/slice-view-orientation-of-oblique-rotated-volumes-aligned-to-volume-or-anatomical-axes/20092/10 "2021-10-26T10:17:31Z")

</div>

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.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/a/d/ad7951d56be3d1d8630722553356968e8f488751.jpeg)

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.

Thanks!

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [October 26, 2021, 11:43am UTC](https://discourse.slicer.org/t/slice-view-orientation-of-oblique-rotated-volumes-aligned-to-volume-or-anatomical-axes/20092/11 "2021-10-26T11:43:31Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Sharada](https://avatars.discourse-cdn.com/v4/letter/s/ba8739/32.png) [@Sharada](https://discourse.slicer.org/u/Sharada)\
**Post date:** [October 26, 2021, 2:47pm UTC](https://discourse.slicer.org/t/slice-view-orientation-of-oblique-rotated-volumes-aligned-to-volume-or-anatomical-axes/20092/12 "2021-10-26T14:47:28Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [October 27, 2021, 4:45am UTC](https://discourse.slicer.org/t/slice-view-orientation-of-oblique-rotated-volumes-aligned-to-volume-or-anatomical-axes/20092/13 "2021-10-27T04:45:00Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Suhaim](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/suhaim/32/81421_2.png) [@Suhaim](https://discourse.slicer.org/u/Suhaim)\
**Post date:** [June 10, 2026, 10:30am UTC](https://discourse.slicer.org/t/slice-view-orientation-of-oblique-rotated-volumes-aligned-to-volume-or-anatomical-axes/20092/14 "2026-06-10T10:30:49Z")

</div>

Hi @lassoan,  
Is there any way to make this the default application behaviour? What I need is,

- When a volume is loaded, it is viewed along the anatomical axes by default

> [@lassoan](#):
>
> 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”).

I attempted to do what you mentioned above. This option in the subject hierarchy tree doesn’t meet my requirement as the slice nodes are aligned along the volume axes the moment the volume is loaded. I believe as of now there is no easy way to do this in Slicer?

I have done a temporary fix till I can find a better solution for this. As I have built slicer from source, I modified `vtkMRMLApplicationLogic::FitSliceToContent`’s one line as shown below,

```auto
vtkMRMLSliceNode* sliceNode = sliceLogic->GetSliceNode();

if (resetOrientation)
{
  // Set to default orientation before rotation so that the view is snapped
  // closest to the default orientation of this slice view.
  sliceNode->SetOrientationToDefault();

  // This is the line I commented out to prevent the slice view from being
  // rotated to the closest volume axis.
  // sliceLogic->RotateSliceToLowestVolumeAxes(false);
}

```

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [June 10, 2026, 8:13pm UTC](https://discourse.slicer.org/t/slice-view-orientation-of-oblique-rotated-volumes-aligned-to-volume-or-anatomical-axes/20092/15 "2026-06-10T20:13:59Z")

</div>

You can choose in the right-click menu of the show icon if you want to align the slice views to volume axis or not when you show a volume. The setting is persistent - it will be used even if you restart the application.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/2/9/298efdbebdca8b1b1912ef1a79a3a442b7530413.png)

So, there should be no need to call `SetOrientationToDefault()`.
