andon | 19 Jun 2012 16:09
Picon

itk reading dicom series with multiframe and singleframe


Hi all,
I'm quite new to itk, but i'm loving this library. Now i got a problem. I
need to read a cardiac dicom series. It contains both multiframe and
singleframe dicom. If i use the normal code, i got an error telling me that
the sizes of multiframe dicoms are not regular. This is the code i use:
 const unsigned int InputDimension = 3;
  const unsigned int OutputDimension = 3;

  typedef signed short PixelType;

  typedef itk::Image< PixelType, InputDimension >
    InputImageType;
    typedef itk::Image< PixelType, 2 >
    InputImageType2;

  typedef itk::Image< PixelType, OutputDimension >
    OutputImageType;
  typedef itk::ImageSeriesReader< InputImageType >
    ReaderType;
  typedef itk::ImageFileReader< InputImageType2 >
    ReaderType2;

  typedef itk::GDCMImageIO
    ImageIOType;
  typedef itk::GDCMSeriesFileNames
    InputNamesGeneratorType;

////////////////////////////////////////////////  
// 1) Read the input series

  ImageIOType::Pointer gdcmIO = ImageIOType::New();
  InputNamesGeneratorType::Pointer inputNames =
InputNamesGeneratorType::New();

  inputNames->SetInputDirectory( "../data/DICOM/IMAGES" );

  const ReaderType::FileNamesContainer & filenames =
inputNames->GetInputFileNames();

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

  reader->SetImageIO( gdcmIO );

  reader->SetFileNames( filenames );

could anyone help me? 
Thank you very much
Cheers,
Antonio
-- 
View this message in context: http://old.nabble.com/itk-reading-dicom-series-with-multiframe-and-singleframe-tp34035432p34035432.html
Sent from the ITK - Users mailing list archive at Nabble.com.

_____________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.php

Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ

Follow this link to subscribe/unsubscribe:
http://www.itk.org/mailman/listinfo/insight-users


Gmane