[Insight-users] checkerboard VTK

A.R.Lopessimoes at ewi.utwente.nl A.R.Lopessimoes at ewi.utwente.nl
Mon Aug 16 12:46:06 EDT 2010


Hi all,

 

I've recently started working with ITK+VTK in Python and this is my
problem: 

 

I am registering two images and I would like to visualize the
checkerboard of the result. I managed to do that with ITK, but I would
like to try it also on VTK (using vtkImageCheckerboard). 

I thought I should do something as written below (where my
"fixedCast.GetOutput()" and "outputCast.GetOutput()" are the fixed and
the moving image after registration, resampling and casting to the
output type).

 

connectorFixed = itk.ImageToVTKImageFilter[OutputImageType].New()

connectorMoving = itk.ImageToVTKImageFilter[OutputImageType].New()

 

connectorFixed.SetInput( fixedCast.GetOutput() )

connectorMoving.SetInput( outputCast.GetOutput() )

 

 

checker = vtk.vtkImageCheckerboard()

 

checker.SetInput1(connectorFixed.GetOutput())

checker.SetInput2(connectorMoving.GetOutput())

 

 

However, I'm not getting any results. When I try to render the image, a
window opens but right afterwards I get an error message that python.exe
stops working. I tried writing the result on a file, but the file was
not created, although I didn't get any errors.

 

Another related question: is it possible to change the number of squares
of the checkerboard in ITK? I tried to search for this but I couldn't
find anything.

 

Thanks in advance.

 

Regards,

 

Rita

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20100816/180999c3/attachment.htm>


More information about the Insight-users mailing list