# Computing transformation matrix on labelmaps

**URL:** <https://discourse.slicer.org/t/computing-transformation-matrix-on-labelmaps/6903>\
**Category:** Support\
**Tags:** registration, segmentation\
**Created:** [May 23, 2019, 6:49pm UTC](https://discourse.slicer.org/t/computing-transformation-matrix-on-labelmaps/6903 "2019-05-23T18:49:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![m.hilani](https://avatars.discourse-cdn.com/v4/letter/m/77aa72/32.png) [@m.hilani](https://discourse.slicer.org/u/m.hilani)\
**Post date:** [May 23, 2019, 6:49pm UTC](https://discourse.slicer.org/t/computing-transformation-matrix-on-labelmaps/6903/1 "2019-05-23T18:49:01Z")

</div>

Hi all,

I’ve been working on segmentation of a full body MRI, and after segmenting most of the tissues I realized the need to co-register all the different sequences that I’m using for segmentation.  
Using 3D slicer, I was able to have one reference MRI sequence and a transformation matrix that allows each other scan I used in my segmentation to be co registered with it.

My question is about the labelmaps that I have already created prior to co-registering the sequences together.  
Is it possible to apply the transform matrix on the labelmaps to have them all co registered with the reference MRI sequence?  
If possible could you explain to me how this is done and how to create a model (.stl) from the transformed labelmap file (.nii).

Thank you!  
Michel

---

<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:** [May 23, 2019, 6:58pm UTC](https://discourse.slicer.org/t/computing-transformation-matrix-on-labelmaps/6903/2 "2019-05-23T18:58:05Z")

</div>

You can apply the same transformation to a segmentation or model (STL file) as you applied to the volume. You can apply a transform in Transforms module (Apply transform section) or in Data module (double-click on the transform column and select transform).

---

<div class="post-metadata">

**Author:** ![m.hilani](https://avatars.discourse-cdn.com/v4/letter/m/77aa72/32.png) [@m.hilani](https://discourse.slicer.org/u/m.hilani)\
**Post date:** [May 28, 2019, 12:19pm UTC](https://discourse.slicer.org/t/computing-transformation-matrix-on-labelmaps/6903/3 "2019-05-28T12:19:42Z")

</div>

Thank you so much Andras!  
I didn’t realize that I can upload the .stl file and apply the transformation directly on it.
