# FreeSurfer's mri\_compute\_volume\_fractions as 5tt input to ACT

**URL:** <https://community.mrtrix.org/t/freesurfers-mri-compute-volume-fractions-as-5tt-input-to-act/707>\
**Category:** Uncategorized\
**Created:** [February 8, 2017, 8:20pm UTC](https://community.mrtrix.org/t/freesurfers-mri-compute-volume-fractions-as-5tt-input-to-act/707 "2017-02-08T20:20:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Antonin\_Skoch](https://community.mrtrix.org/user_avatar/community.mrtrix.org/antonin_skoch/32/358_2.png) [@Antonin\_Skoch](https://community.mrtrix.org/u/Antonin_Skoch)\
**Post date:** [February 8, 2017, 8:20pm UTC](https://community.mrtrix.org/t/freesurfers-mri-compute-volume-fractions-as-5tt-input-to-act/707/1 "2017-02-08T20:20:11Z")

</div>

Dear experts,

I was wondering if you have some experience with using FreeSurfer’s (FS) tool `mri_compute_volume_fractions` for generation of 5tt image for ACT. It seems that this tool produces much better GM/WM/CSF estimations than FAST. Especially the cortex boundary is better delineated and no subcortical structures and voxels adjacent to ventricles are assigned as cortical GM. The only issue is in the potential subcortical structures replacement by FIRST, since in `mri_compute_volume_fractions` also cerebellar GM is assigned as subcortical GM. But this is also solvable by using freeSurfer segmentation to reassign cerebellar GM as cortical GM.

I am attaching the examples so that you can look.  
Could you please comment on?  
Do you think that switching to `mri_compute_volume_fractions` could improve precision of connectomes generated using ACT?

GM - FAST:

 ![](https://community.mrtrix.org/uploads/default/original/1X/903189aafdff58e3574660481b871717e75943a5.png)

GM - FS:

 ![](https://community.mrtrix.org/uploads/default/original/1X/439cd5565a45b4a8a610a7053e9eab141f4e70fb.png)

subcort GM - FIRST":

 ![](https://community.mrtrix.org/uploads/default/original/1X/54be29f3324258ea96229e31b5e817070e8c2bf0.png)

subcort GM - FS:

 ![](https://community.mrtrix.org/uploads/default/original/1X/a529c0fb6ee50c3e09e987cd18257506ecb06f4b.png)

WM - FAST:

 ![](https://community.mrtrix.org/uploads/default/original/1X/4df91ac93d64ad16a974e8aac3c1485580ae5d99.png)

WM - FS:

 ![](https://community.mrtrix.org/uploads/default/original/1X/0ef8bca75c8b2ff8f99296a9e5462f49f67d1fab.png)

CSF - FAST:

 ![](https://community.mrtrix.org/uploads/default/original/1X/9b7dd7787f76bed93a80a38c1305470b45b73bcb.png)

CSF - FS:

 ![](https://community.mrtrix.org/uploads/default/original/1X/d7f3bc6ab90f813c8f886f1d5b87f97d407d0646.png)

Regards,

Antonin

---

<div class="post-metadata">

**Author:** ![rsmith](https://community.mrtrix.org/user_avatar/community.mrtrix.org/rsmith/32/2672_2.png) [@rsmith](https://community.mrtrix.org/u/rsmith)\
**Post date:** [February 9, 2017, 1:20pm UTC](https://community.mrtrix.org/t/freesurfers-mri-compute-volume-fractions-as-5tt-input-to-act/707/2 "2017-02-09T13:20:59Z")

</div>

Hi Antonin,

Since the original development of ACT I’ve wanted to write a script to generate a 5TT image based on a FreeSurfer surface parameterisation of the cortex; I’ve just never gotten around to giving it a proper shot. I wasn’t aware of the `mri_compute_volume_fractions` tool. _MRtrix3_ has its own command for generating partial volume images from mesh representations - `mesh2pve` - but it relies on being provided with a _closed_ mesh, which is not what comes out of FreeSurfer by default (though this can be achieved through mesh-based operations).

Much of the tissue segmentation of the brain will definitely be ‘cleaner’ using such an approach compared to `fast`, since it’s driven much more by anatomical priors and less susceptible to spurious image noise. It’s not without cost though: non-cortical structures undergo a ‘hard’ image-based segmentation in FreeSurfer, and so come out as binary masks rather than continuously-varying volume fractions (see for instance the ventricle borders, cerebellum and brain stem). The FreeSurfer reconstruction is also not guaranteed to work in all subjects without manual intervention.

One feature of the Python scripts provided with _MRtrix3_ is that for those scripts where an _algorithm_ must be selected (`5ttgen` and `dwi2response` at present), it’s possible to add your own custom algorithms: if it’s placed in the appropriate directory, the master script will detect the presence of that file, and make it available for use at the command-line. It will even be added to the script’s help pages. So if you feel like having a go at writing a `5ttgen` algorithm to exploit this tool, I’d be more than happy to assist you.

Cheers  
Rob
