# Transform tractography outputs to a .nii file

**URL:** <https://community.mrtrix.org/t/transform-tractography-outputs-to-a-nii-file/8623>\
**Category:** Uncategorized\
**Tags:** tractography\
**Created:** [November 26, 2025, 8:29am UTC](https://community.mrtrix.org/t/transform-tractography-outputs-to-a-nii-file/8623 "2025-11-26T08:29:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chai](https://community.mrtrix.org/letter_avatar_proxy/v4/letter/c/919ad9/32.png) [@Chai](https://community.mrtrix.org/u/Chai)\
**Post date:** [November 26, 2025, 8:29am UTC](https://community.mrtrix.org/t/transform-tractography-outputs-to-a-nii-file/8623/1 "2025-11-26T08:29:51Z")

</div>

Dear experts,

I have utilized MRtrix and tractography toolbox TractSeg to reconstruct 72 white matter tracts for each subject. I want to transform the tractography output .tck file of each tract to .nii file, and I am not sure what codes should I use.

By the way, after transforming the .tck files to .nii files, can I merge these 72 .nii file into one file to create a subject-specific white matter segmentation atlas for each participant?

Look forward to any suggestions!

Chai

---

<div class="post-metadata">

**Author:** ![WilliamFCB](https://community.mrtrix.org/letter_avatar_proxy/v4/letter/w/e68b1a/32.png) [@WilliamFCB](https://community.mrtrix.org/u/WilliamFCB)\
**Post date:** [November 26, 2025, 10:42am UTC](https://community.mrtrix.org/t/transform-tractography-outputs-to-a-nii-file/8623/2 "2025-11-26T10:42:02Z")

</div>

Hi Chai,

Please check out the tckmap and the mrthreshold commands for creating binary tract maps. Note that some TractSeg-generated tracts greatly overlap each other, e.g., the striato- and thalamo- ones in particular. Check this forum and the MRtrix documentation for details.

Cheers

William
