[Insight-users] jpg display

liu jianfei flair.liu at gmail.com
Wed Jul 12 17:18:50 EDT 2006


Hi, everyone

   I'm using ITK filters to process some colon JPG files and VTK
filters to display the results. itk::ImageToVTKImageFilter was
employed to convert ITK data into the vtk structedpoints. The results
of ITK image were considered as the texture and attacted with the
vtkplanesource to display the final image. Here are a part of codes.

    FloatImageConnectorType::Pointer connector =
FloatImageConnectorType::New();
 connector->SetInput(image);
 connector->Update();
 Texture->SetInput(connector->GetOutput());

  However, the result image looks like lack of color information.

  If the jpg file is directly loaded using vtkJPEGReader, the result
is correct.

   vtkJPEGReader *JPEGReader = vtkJPEGReader::New();
 JPEGReader->SetFileName("/Users/ljf/program/Registration/data/OCvideo001.jpg");
 Texture->SetInput(JPEGReader->GetOutput());


But I want to use ITK filters to do some image processing for my colon
data, and the results could be automatically updataed and visualized.
Can anyone tell me what's wrong with my pipeline between ITK and VTK?
Thanks a lot.
-- 
Sincerely
Jianfei Liu


More information about the Insight-users mailing list