Hi,

I tried to integrate a TIFF series reader in the 
mitkDataTreeNodeFactory.cpp in MITK. For reading I use the 
itk::ImageSeriesReader and generate a mitk image with the functions 
InitializeByItk and SetVolume. However, this results in a volume that 
does not contain the whole e.g. 100 TIFF images. Instead the volume 
consists of 100 slices of just the first TIFF image.

I don't know exactly if this problem is MITK related, but the file names 
are correct and the itk series reader seems to produce a proper volume.

Below, I have attached the source snippet of the series reader in the 
mitkDataTreeNodeFactory.cpp.

Thanks a lot for any help,

Marius

----------
      typedef unsigned char PixelType;
      const unsigned int Dimension = 3;

      typedef itk::Image< PixelType, Dimension > ImageType;
      typedef itk::ImageSeriesReader< ImageType > ReaderType;

      ReaderType::Pointer reader = ReaderType::New();

      reader->SetImageIO( itk::TIFFImageIO::New() );

      this->GenerateFileList();

      reader->SetFileNames( m_MatchedFileNames );

      try
      {
          reader->Update();

           mitk::Image::Pointer image = mitk::Image::New();
           image->InitializeByItk( reader->GetOutput() );
           image->SetVolume( reader->GetOutput()->GetBufferPointer() );

           mitk::DataTreeNode::Pointer node = this->GetOutput();
           node->SetData( image );        
      }


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to