1
votes

Sorry the naive question.

What is the way to exchange data between the VTK and ITK packages?

Example: Read a .mhd or .mha em VTK and using it in ITK registration.

Thanks,

Luis Gonçalves

1

1 Answers

1
votes

Here's an example on how to convert a VTK image to an ITK image in python:

https://itk.org/ITKExamples/src/Bridge/VtkGlue/ConvertvtkImageDataToAnitkImage/Documentation.html

It uses ITK's itk.VTKImageToImageFilter. There is also a filter to go the other direction, ImageToVTKImageFilter.

Note that you can read .mha or .mhd file directly in ITK.