# Reuse 5ttgen fsl subcortical segmentation for labelsgmfix

**URL:** <https://community.mrtrix.org/t/reuse-5ttgen-fsl-subcortical-segmentation-for-labelsgmfix/3382>\
**Category:** Uncategorized\
**Tags:** connectomics\
**Created:** [March 5, 2020, 3:49pm UTC](https://community.mrtrix.org/t/reuse-5ttgen-fsl-subcortical-segmentation-for-labelsgmfix/3382 "2020-03-05T15:49:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![NicDC](https://community.mrtrix.org/user_avatar/community.mrtrix.org/nicdc/32/1779_2.png) [@NicDC](https://community.mrtrix.org/u/NicDC)\
**Post date:** [March 5, 2020, 3:49pm UTC](https://community.mrtrix.org/t/reuse-5ttgen-fsl-subcortical-segmentation-for-labelsgmfix/3382/1 "2020-03-05T15:49:47Z")

</div>

Dear MRtrix3 experts,

I was just wondering whether there is a way to reuse the FLIRT output from 5ttgen fsl and pass it on to labelsgmfix? It seems inefficient to have to perform the segmentation multiple times on the same T1 image…

Thanks in advance!

Nick

---

<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:** [March 8, 2020, 6:01am UTC](https://community.mrtrix.org/t/reuse-5ttgen-fsl-subcortical-segmentation-for-labelsgmfix/3382/2 "2020-03-08T06:01:53Z")

</div>

Hi Nick,

I agree with the inefficiency point. Re-use of processing steps requires standardization of the formatting of such data, which long-term is the goal of BIDS Derivatives; but that’s going to be a pretty long-term project I think.

Rather than "re-using the FLIRT output from `5ttgen fsl`", the more appropriate design would be to execute FSL `run_first_all` as a standalone command, and have both `5ttgen fsl` and `labelsgmfix` have command-line options that read from the output of such, executing `run_first_all` themselves internally only if that option is not specified. This wouldn’t be too difficult to implement for anyone reasonably familiar with Python, it’s just one of many things that fails to achieve priority over all the other things I need to do myself…

Cheers  
Rob

---

<div class="post-metadata">

**Author:** ![NicDC](https://community.mrtrix.org/user_avatar/community.mrtrix.org/nicdc/32/1779_2.png) [@NicDC](https://community.mrtrix.org/u/NicDC)\
**Post date:** [March 15, 2020, 10:29pm UTC](https://community.mrtrix.org/t/reuse-5ttgen-fsl-subcortical-segmentation-for-labelsgmfix/3382/3 "2020-03-15T22:29:24Z")

</div>

Thanks Rob,

It’s not a huge inconvenience, and works fine as it is.

I have no experience with Python, only unix bash shell scripting. If I do find the time to get into it, I will have a go at this!

Best,  
Nick
