[Insight-users] DICOM and orientation

Bill Lorensen bill.lorensen at gmail.com
Mon Jun 29 13:55:54 EDT 2009


vtk's images are flipped vertically from itk's.

On Mon, Jun 29, 2009 at 1:45 PM, Lic. José M. Rodriguez
Bacallao<jmrbcu at gmail.com> wrote:
> hi folks, I'm reading a dicom image with itk (WrapITK) and visualizing
> with vtk but, when I try to visualize it, it show inverted in the
> screen, this is my code to read and visualize the image:
>
> image_type = itk.Image[itk.SS, 2]
>
> image_type = itk.Image[itk.SS, 2]
> fr = itk.ImageFileReader[image_type].New()
> con = itk.ImageToVTKImageFilter[image_type].New()
>
> fr.SetFileName('/home/jmrbcu/temp/IM66.dcm')
> con.SetInput(fr.GetOutput())
>
> v = vtk.vtkImageViewer2()
> ri = vtk.vtkRenderWindowInteractor()
> v.SetupInteractor(ri)
> v.SetInput(con.GetOutput())
>
> v.Render()
> v.SetColorWindow(255)
> v.SetColorLevel(128)
>
> ri.Start()
>
> --
> Lic. José M. Rodriguez Bacallao
> Centro de Biofisica Medica
> -----------------------------------------------------------------
> Todos somos muy ignorantes, lo que ocurre es que no todos ignoramos lo mismo.
>
> Recuerda: El arca de Noe fue construida por aficionados, el titanic
> por profesionales
> -----------------------------------------------------------------
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.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