# How to convert a anisotropic to isotropic and then back to anisotropic?

**URL:** https://discourse.itk.org/t/how-to-convert-a-anisotropic-to-isotropic-and-then-back-to-anisotropic/1451
**Category:** Uncategorized
**Created:** [November 30, 2018, 11:34pm UTC](https://discourse.itk.org/t/how-to-convert-a-anisotropic-to-isotropic-and-then-back-to-anisotropic/1451 "2018-11-30T23:34:59Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![mark\_john](https://discourse.itk.org/letter_avatar_proxy/v4/letter/m/d9b06d/32.png) [@mark\_john](https://discourse.itk.org/u/mark_john)
#### Post date: [November 30, 2018, 11:35pm UTC](https://discourse.itk.org/t/how-to-convert-a-anisotropic-to-isotropic-and-then-back-to-anisotropic/1451/1 "2018-11-30T23:35:00Z")

</div>

Hello, I have a reference image that is isotropic (1mm x 1mm x 1mm). A target image is anisotropic (0.5 mm x0.5mmx2mm). I want to convert the target image to isotropic that same with the reference image. After obtaining the processed target image, I will do the thresholding to obtain a mask. The mask is isotropic because it processed on the processed target image. I want to convert the mask back to the original target image (anisotropic) using simple-ITK in python. Could you help me please? The phases can be summarized as

1. Convert the target image to isotropic (1mmx1mmx1mm) to obtain `target_iso`
2. Convert back the `target_iso` to the anisotropic

Thanks

---

<div class="post-metadata">

### Author: ![dzenanz](https://discourse.itk.org/user_avatar/discourse.itk.org/dzenanz/32/1093_2.png) [@dzenanz](https://discourse.itk.org/u/dzenanz)
#### Post date: [December 3, 2018, 7:15pm UTC](https://discourse.itk.org/t/how-to-convert-a-anisotropic-to-isotropic-and-then-back-to-anisotropic/1451/2 "2018-12-03T19:15:28Z")

</div>

For resampling images you should look at ITK software guide section 2.9.4 [`Resample Image Filter`](https://itk.org/ITKSoftwareGuide/html/Book2/ITKSoftwareGuide-Book2ch2.html#x17-800002.9).

But why would you do thresholding on a resampled image? Why not do thresholding directly on the target image? That way you will have full-resolution mask without resampling (which is both computationally expensive and loses quality).

---

<div class="post-metadata">

### Author: ![mark\_john](https://discourse.itk.org/letter_avatar_proxy/v4/letter/m/d9b06d/32.png) [@mark\_john](https://discourse.itk.org/u/mark_john)
#### Post date: [December 4, 2018, 2:13pm UTC](https://discourse.itk.org/t/how-to-convert-a-anisotropic-to-isotropic-and-then-back-to-anisotropic/1451/3 "2018-12-04T14:13:27Z")

</div>

I trained on isotropic images and testing on anisotropic image. So, I gave threshold just simple example.
