[vtkusers] JPG display

liu jianfei flair.liu at gmail.com
Wed Jul 12 17:17:09 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.
I've attached this result as image1 in this email.

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

    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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image1.jpg
Type: image/jpeg
Size: 14662 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20060712/fe955de8/attachment.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image2.jpg
Type: image/jpeg
Size: 16267 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20060712/fe955de8/attachment-0001.jpg>


More information about the vtkusers mailing list