# Missing “Reference Volume” option in FreeSurfer Importer (it looks like version 5.6 onwards)

**URL:** https://discourse.slicer.org/t/missing-reference-volume-option-in-freesurfer-importer-it-looks-like-version-5-6-onwards/35977
**Category:** Development
**Tags:** freesurfer
**Created:** [May 7, 2024, 10:34pm UTC](https://discourse.slicer.org/t/missing-reference-volume-option-in-freesurfer-importer-it-looks-like-version-5-6-onwards/35977 "2024-05-07T22:34:30Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Nis175](https://avatars.discourse-cdn.com/v4/letter/n/aeb1de/32.png) [@Nis175](https://discourse.slicer.org/u/Nis175)
#### Post date: [May 7, 2024, 10:34pm UTC](https://discourse.slicer.org/t/missing-reference-volume-option-in-freesurfer-importer-it-looks-like-version-5-6-onwards/35977/1 "2024-05-07T22:34:31Z")

</div>

Dear 3D Slicer Team,

I have noticed that the “Reference Volume” option available in version 5.4.0 of the FreeSurfer importer has been removed in the latest versions, including 5.6.2.

Please see the attached screenshots.

This option is crucial for me to transform recon-all models to specific MRI. Could you please clarify if this change was intentional, or provide guidance on how to access similar functionality in the newer versions?

Thank you,

Sincerely,

Nis175

 ![Comparison between Slicer 5.4 and Slicer 5.6.2_FreesurferImporter](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/1/e/1ecf142bb162fa9d65665e783d0bc5df26d78e09.png)

---

<div class="post-metadata">

### Author: ![jamesobutler](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jamesobutler/32/7511_2.png) [@jamesobutler](https://discourse.slicer.org/u/jamesobutler)
#### Post date: [May 7, 2024, 11:47pm UTC](https://discourse.slicer.org/t/missing-reference-volume-option-in-freesurfer-importer-it-looks-like-version-5-6-onwards/35977/2 "2024-05-07T23:47:48Z")

</div>

It appears that @Sunderlandkyl made this change in:

> <https://github.com/PerkLab/SlicerFreeSurfer/commit/12c8ffd1014cdf1417d92885ba20bccdb2fc46fd>
>
> NiBabel contains a more complete implementation for loading FreeSurfer models, s…uch as being able to read in the additional information from the surface file footer.
> This commit switches from using the vtkFSSurfaceReader implementation to using NiBabel for surface model loading. Other types of FreeSurfer files are currently still loaded using the existing classes.
> 
> A benefit of this change is that it is no longer needed to specify a reference volume when loading in a surface, since the information is read from the surface file footer.
> 
> Re #17

> NiBabel contains a more complete implementation for loading FreeSurfer models, such as being able to read in the additional information from the surface file footer.  
> This commit switches from using the vtkFSSurfaceReader implementation to using NiBabel for surface model loading. Other types of FreeSurfer files are currently still loaded using the existing classes.
> 
> A benefit of this change is that it is no longer needed to specify a reference volume when loading in a surface, since the information is read from the surface file footer.

See the associated conversation at:

> <https://github.com/PerkLab/SlicerFreeSurfer/issues/17>
>
> Here is the initial mri from the free dataset: https://openneuro.org/datasets/ds…004776/versions/1.0.0
> 
> https://s3.amazonaws.com/openneuro.org/ds004776/sub-01/anat/sub-01\_T1w.nii.gz?versionId=lob8sYgfY.jRec5aLib\_K73v\_.NBAeQB
> 
> Here is the mrprage.nii.gz file from the pipeline (input grayscale volume):
> \[mprage.nii.gz.zip\](https://github.com/PerkLab/SlicerFreeSurfer/files/13053617/mprage.nii.gz.zip)
> 
> 
> Here is the lh.pial (for example) after running infant\_recon\_all: 
> \[lh.pial.zip\](https://github.com/PerkLab/SlicerFreeSurfer/files/13053527/lh.pial.zip)
> 
> Direction Matrix:
> 
> !\[image\](https://github.com/PerkLab/SlicerFreeSurfer/assets/3021667/a9581d0c-8866-4e4d-9ade-e299e3a97780)
> 
> Opening mprage.nii.gz as a regular volume and opening lh.pial as a Freesurfer model with mprage.nii.gz as reference:
> 
> !\[image\](https://github.com/PerkLab/SlicerFreeSurfer/assets/3021667/ce92d564-9b1e-4fd9-b752-55da166fc5fa)
> 
> 
> However, freeview reads and align the two files correctly.
> 
> !\[image\](https://github.com/PerkLab/SlicerFreeSurfer/assets/3021667/ce24dfd9-38ea-42d7-ad0e-4ab27d73b2c8)

---

<div class="post-metadata">

### Author: ![Sunderlandkyl](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/sunderlandkyl/32/79987_2.png) [@Sunderlandkyl](https://discourse.slicer.org/u/Sunderlandkyl)
#### Post date: [May 8, 2024, 1:35pm UTC](https://discourse.slicer.org/t/missing-reference-volume-option-in-freesurfer-importer-it-looks-like-version-5-6-onwards/35977/3 "2024-05-08T13:35:34Z")

</div>

We switched to using NiBabel to load FreeSurfer models, which allowed us to read the footer data containing the original reference volume geometry. This means that we should be able to read the models into the correct coordinate system without requiring the reference volume.

Let me know if you encounter any issues or misalignments.

---

<div class="post-metadata">

### Author: ![Nis175](https://avatars.discourse-cdn.com/v4/letter/n/aeb1de/32.png) [@Nis175](https://discourse.slicer.org/u/Nis175)
#### Post date: [May 16, 2024, 9:15pm UTC](https://discourse.slicer.org/t/missing-reference-volume-option-in-freesurfer-importer-it-looks-like-version-5-6-onwards/35977/4 "2024-05-16T21:15:49Z")

</div>

Thank you Kyle! I will let you know when I have questions regarding NiBabel.

---

<div class="post-metadata">

### Author: ![Nis175](https://avatars.discourse-cdn.com/v4/letter/n/aeb1de/32.png) [@Nis175](https://discourse.slicer.org/u/Nis175)
#### Post date: [May 16, 2024, 9:17pm UTC](https://discourse.slicer.org/t/missing-reference-volume-option-in-freesurfer-importer-it-looks-like-version-5-6-onwards/35977/5 "2024-05-16T21:17:20Z")

</div>

Thank you James for the information!
