[Insight-users] ITK LSM READER

Manuss mac.manuss at gmail.com
Thu Oct 19 09:08:29 EDT 2006


  Hello,
I  try to convert the LSM files (Zeiss) to VTK file format.

I had a look on the different Library of VTK/ITK
and i saw that on ITK->Code->IO, there is a file call itkLSMImageIO  
(.h and .cxx) which read a LSM file.
But i have a problem when i read the LSM file and save it in a VTK  
format, it saves only the first image of the stack.
It create all the different images in z and make a VTK matrix with  
all this stack, but only the first image on this stack is written,  
the other are all black ...
Have you got an Idea, i think it's a problem of the reader.



I use the file itkLSMImageIOTest.cxx


   typedef itk::RGBPixel< unsigned char >   InputPixelType;
   typedef itk::Image< InputPixelType, 3 > InputImageType;
   typedef itk::ImageFileReader< InputImageType > ReaderType;
   typedef itk::LSMImageIO ImageIOType;

   ReaderType::Pointer reader = ReaderType::New();
   reader->SetFileName( filename );

   ImageIOType::Pointer lsmImageIO = ImageIOType::New();
   reader->SetImageIO( lsmImageIO );

   reader->Update();


   typedef itk::ImageFileWriter< InputImageType >  WriterType;
   WriterType::Pointer writer = WriterType::New();
   writer->SetFileName( outfilename );
   writer->SetInput( reader->GetOutput() );

   writer->Update();

lsmImageIO->Print(std::cout);

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20061019/21fdd88f/attachment.html


More information about the Insight-users mailing list