[Insight-users] Re: ITK LSM READER

Daniel Mace dlm19 at duke.edu
Fri Dec 8 17:27:11 EST 2006


Gaeten,

Could you post your code for using the vtkLSMReader and converting it 
into the ITK framework?  My problem seems to be with the ImageType 
parameters that the vtkLSMReader is outputing.  The LSM image I am 
trying to read is a 4 Dimensional image with two channels (x * y * 
x_tiling * y_tiling).  I've tried setting my itkVTKImageToImageFilter to 
a 4D Image with pixel type of Vector (2 and 3 dimensional vectors, 
neither worked), and also as a 5D image, and as a VectorImage to no 
avail (it seems that the itkVTKImageToImageFilter does not like 
VectorImages).  BioImageXD correctly reads the LSM file and sets it to 
it's correct settings for viewing, so I'm guessing my issue is with my 
templating of the itkVTKImageToImageFilter.

I can send you the LSM file I am trying to read if that would help.

Cheers,
Dan

Gaetan Lehmann <gaetan.lehmann at ...> writes:

 >
 >
 > Hi,
 >
 > LSM reader doesn't seem to be fully functional in ITK. The last time I  
 > tried it, I was able to read an lsm file only if it contains a single  
 > channel.
 >
 > You should prefer the very good vtkLSMReader developed for 
BioImageXD. I'm  
 > using it daily, and it works perfectly.
 >
 > http://svn.sourceforge.net/viewvc/bioimagexd/bioimagexd/trunk/C%2B%2B/
 > http://modeling.bio.jyu.fi:8080/bioimagexd
 >
 > Gaetan
 >
 > On Thu, 19 Oct 2006 15:08:29 +0200, Manuss <mac.manuss at ...> wrote:
 >
 > >   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);
 > >
 >




More information about the Insight-users mailing list