[Insight-users] flipped VTK
shady_shidfar at yahoo.com
Tue Sep 2 08:56:00 EDT 2008
I have a weird problem. I'm using itk to read an image, then convert it to VTK and display it. The problem is that the result displayed image is filpped vertically. I know itk's image origin is at top left and VTK's at bottom right (That's correct, right?), But I thought this would be corrected by itkImageToVTKImageFilter , but it seems it's not. I'm attaching the code. Am I doing anything wrong? or do I have to flip the image every time I want to display the image in VTK???
I'm not sure if the problem is with ITK or VTK?
Thanks for your help
input.Read(itkImage_UC3input = itkImage_UC3.New();"C:/brainCut.tif");// Import ITK image to VTKitk2vtk.SetInput(input);
}itkImageToVTKImageFilter_IUC3itk2vtk =itkImageToVTKImageFilter_IUC3.New();vtkImageDatadata = itk2vtk.GetOutput();vtkImageActorimageActor= newvtkImageActor();vtkRendererrenderer = newvtkRenderer();catch(Exceptionex)Console.WriteLine(ex);
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Insight-users