Convert TIFF to ITK

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. 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. (See the README.md)

Thank you all so much!

Hello,

Yes, install the package:

pip install itk-io

Read and write:

import itk

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

Hope this helps.