# Convert TIFF to ITK

**URL:** https://discourse.itk.org/t/convert-tiff-to-itk/6040
**Category:** Beginner Questions
**Created:** [July 6, 2023, 6:05pm UTC](https://discourse.itk.org/t/convert-tiff-to-itk/6040 "2023-07-06T18:05:05Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![itkusers](https://discourse.itk.org/letter_avatar_proxy/v4/letter/i/dbc845/32.png) [@itkusers](https://discourse.itk.org/u/itkusers)
#### Post date: [July 6, 2023, 6:05pm UTC](https://discourse.itk.org/t/convert-tiff-to-itk/6040/1 "2023-07-06T18:05:05Z")

</div>

Hi everyone:

My lab group is interested in using ITK-compatible files for the image segmentation platform VesSAP: [GitHub - vessap/vessap: Experimental code and examples for: Automated analysis of whole brain vasculature using machine learning](https://github.com/vessap/vessap). Unfortunately, the output from our microscopy is in the format of TIFF files. We would like to know if there a way to convert TIFF files into ITK-compatible files, as described here: [Code Ocean](https://codeocean.com/capsule/0511563/tree/v1). (See the README.md)

Thank you all so much!

---

<div class="post-metadata">

### Author: ![matt.mccormick](https://discourse.itk.org/user_avatar/discourse.itk.org/matt.mccormick/32/7_2.png) [@matt.mccormick](https://discourse.itk.org/u/matt.mccormick)
#### Post date: [July 6, 2023, 7:16pm UTC](https://discourse.itk.org/t/convert-tiff-to-itk/6040/2 "2023-07-06T19:16:33Z")

</div>

Hello,

Yes, install the package:

```sh
pip install itk-io

```

Read and write:

```python
import itk

image = itk.imread('image.tiff')
itk.imwrite(image, 'image.nii.gz')

```

Hope this helps.
