[Insight-users] checkerboard VTK

Bill Lorensen bill.lorensen at gmail.com
Mon Aug 16 14:04:58 EDT 2010


Try
connectorFixed.Update()
connectorMoving.Update()

On Mon, Aug 16, 2010 at 12:46 PM,  <A.R.Lopessimoes at ewi.utwente.nl> wrote:
> 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
>
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>
>


More information about the Insight-users mailing list