# Resample Image (BRAIN)

**URL:** <https://discourse.slicer.org/t/resample-image-brain/13736>\
**Category:** Support\
**Tags:** resample\
**Created:** [September 28, 2020, 4:07pm UTC](https://discourse.slicer.org/t/resample-image-brain/13736 "2020-09-28T16:07:07Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![zahiraabdala](https://avatars.discourse-cdn.com/v4/letter/z/838e76/32.png) [@zahiraabdala](https://discourse.slicer.org/u/zahiraabdala)\
**Post date:** [September 28, 2020, 4:07pm UTC](https://discourse.slicer.org/t/resample-image-brain/13736/1 "2020-09-28T16:07:07Z")

</div>

Hi everyone, I need to know how Resample Image (BRAIN) module works. I use it and its works very well but I need more information about the functionality. I was looking for more information but I only found this link and it’s not enough [https://www.slicer.org/wiki/Documentation/4.8/Modules/BRAINSResample](https://www.slicer.org/wiki/Documentation/4.8/Modules/BRAINSResample)

Im working with PET image and im using ATLAS image like a reference. I choosed float for pixel type and i used Linear Interpolation Mode. Someone know how the algorithm makes the resample?

Thanks.

---

<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:** [September 28, 2020, 6:21pm UTC](https://discourse.slicer.org/t/resample-image-brain/13736/2 "2020-09-28T18:21:35Z")

</div>

The module uses [ITK ResampleImageFilter](https://itk.org/Doxygen/html/classitk_1_1ResampleImageFilter.html) under the hood, but it has a few tricks to improve usability, speed, and quality for some special cases (e.g., in-place transformation of composite linear transforms, resampling binary images as distance maps, automatic background value computation, etc.). Its main logic is implemented [here](https://github.com/BRAINSia/BRAINSTools/blob/master/BRAINSCommonLib/GenericTransformImage.hxx#L30).

---

<div class="post-metadata">

**Author:** ![zahiraabdala](https://avatars.discourse-cdn.com/v4/letter/z/838e76/32.png) [@zahiraabdala](https://discourse.slicer.org/u/zahiraabdala)\
**Post date:** [September 28, 2020, 10:50pm UTC](https://discourse.slicer.org/t/resample-image-brain/13736/3 "2020-09-28T22:50:51Z")

</div>

Thank you!! I have an other question, does this module take into account any percent error?

---

<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:** [September 28, 2020, 11:51pm UTC](https://discourse.slicer.org/t/resample-image-brain/13736/4 "2020-09-28T23:51:51Z")

</div>

Could you rephrase this question, provide more details, or maybe explain it with a drawing?

---

<div class="post-metadata">

**Author:** ![zahiraabdala](https://avatars.discourse-cdn.com/v4/letter/z/838e76/32.png) [@zahiraabdala](https://discourse.slicer.org/u/zahiraabdala)\
**Post date:** [September 29, 2020, 12:19am UTC](https://discourse.slicer.org/t/resample-image-brain/13736/5 "2020-09-29T00:19:54Z")

</div>

I used Resample Image (BRAIN) module for a PET image by referencing the brain atlas image downloaded from 3D slicer. I chose ‘float’ as pixel type, and when it comes to warping parameters I chose a linear interpolation mode. In the link that you had sent to me, I could see that the algorithms use already established functions such as the itResampleImageFilter.h. I would like to know if this function contemplates a certain percentage of error, and if so, what is the calculated percent error?

---

<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:** [September 29, 2020, 1:45pm UTC](https://discourse.slicer.org/t/resample-image-brain/13736/6 "2020-09-29T13:45:31Z")

</div>

I still don’t understand how a function can “contemplate a certain percentage of error” but since this class is implemented in ITK, it is better to ask for details on the [ITK forum](https://discourse.itk.org/).
