[Insight-users] flipped VTK

Shady Shidfar shady_shidfar at yahoo.com
Tue Sep 2 08:56:00 EDT 2008


Hi Everyone,
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
Shaadi
try{
input.Read(itkImage_UC3input = itkImage_UC3.New();"C:/brainCut.tif");// Import ITK image to VTKitk2vtk.SetInput(input);
itk2vtk.Update();
vtk.
imageActor.SetInput(data);
renderer.AddActor(imageActor);
vtkFormsWindowControl1.GetRenderWindow().AddRenderer(renderer);
vtkFormsWindowControl1.Update();
}
{
}itkImageToVTKImageFilter_IUC3itk2vtk =itkImageToVTKImageFilter_IUC3.New();vtkImageDatadata = itk2vtk.GetOutput();vtkImageActorimageActor= newvtkImageActor();vtkRendererrenderer = newvtkRenderer();catch(Exceptionex)Console.WriteLine(ex);


      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20080902/0b89ec2a/attachment.htm>


More information about the Insight-users mailing list