[ITK] (no subject)

Michka Popoff michkapopoff at gmail.com
Tue Oct 7 04:04:52 EDT 2014


What error message are you getting or what is happening ?
It’s not really clear to me. When you say “It doesn’t work”, I need more details to be able to help you.

Michka

On 7 oct. 2014, at 10:02, Paola Volonghi <pola_88 at hotmail.it> wrote:

> Thanks for your reply.
> We have just tried before to do what you suggested.
> Any other idea??
> Thanks
> Paola
> 
> Subject: Re: [ITK] (no subject)
> From: michkapopoff at gmail.com
> Date: Thu, 2 Oct 2014 13:11:13 +0200
> CC: community at itk.org
> To: pola_88 at hotmail.it
> 
> Hi
> 
> for the moment, the PyBuffer module has been moved out of ITK, and is no more maintained.
> There was a port done for ITK4, but it is not tested so I don’t know how well it is working [1]
> I plan to work a little bit on it one day if I can find some time.
> 
> The way to move images from itk to vtk is to use the ITKVTKGlue module.
> You need to build ITK with:
> Module_ITKVtkGlue=ON
> 
> Then you can do something like this (for a 2d image for example):
> 
> image_type = itk.Image[itk.UC, 2]
> reader = itk.ImageFileReader[image_type].New()
> reader.SetFileName(“PATH/TO/FILE”)
> reader.Update()
> vtk_image = itk.ImageToVTKImageFilter[image_type].New()
> vtk_image.SetInput(reader.GetOutput())
> vtk_image.Update()
> 
> Then you can use the vtk_image as a vtk object, that you can render or work on.
> 
> Is there a specific error message you get ?
> 
> Michka
> 
> [1] https://github.com/InsightSoftwareConsortium/itkPyBuffer
> 
> On 2 oct. 2014, at 11:45, Paola Volonghi <pola_88 at hotmail.it> wrote:
> 
> Hi all,
> we developed a python program on ubuntu 13.10 using vtk library ver. 5.8.0 and itk library ver. 3.20.1. In our program we used also these command lines:
> itk.VTKImageToImageFilter.IF3.New()
> itk.ImageToVTKImageFilter[image_type].New()
> itk.PyBuffer[image_type].GetArrayFromImage( …. )
> but we discovered that they don't work on itk ver. 4.x.
> Is there another way to convert images from itk to vtk and vice versa, using the newest versions of vtk and itk?
>  
> Thanks!
> 
> Paola
> 
> 
> _______________________________________________
> Community mailing list
> Community at itk.org
> http://public.kitware.com/mailman/listinfo/community

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20141007/57965f0c/attachment-0002.html>


More information about the Community mailing list