[Insight-users] itk reading dicom series with multiframe and singleframe

andon antoniod987 at gmail.com
Tue Jun 19 10:09:24 EDT 2012


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.



More information about the Insight-users mailing list