[Insight-users] Convert dicom to raw

Yang, Jinzhong jinzhong76 at gmail.com
Tue Aug 11 15:14:07 EDT 2009


Basically what you need is the DICOM image decoder. If your image is stored
in a series of files, you will need ImageSeriesReader. Here is an example
you may try:

 

 

  typedef itk::ImageSeriesReader< ImageType >     ReaderType;

  typedef itk::DICOMImageIO2                      ImageIOType;

  typedef itk::DICOMSeriesFileNames               SeriesFileNames;

  

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

  SeriesFileNames::Pointer series = SeriesFileNames::New();

  series->SetDirectory(<directory name storing dicom files>);

 

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

  const ReaderType::FileNamesContainer & filenames = series->GetFileNames();

  reader->SetFileNames(filenames);

  reader->SetImageIO(gdcmIO);

  reader->Update();

 

Good luck,

-Jinzhong

 

From: insight-users-bounces at itk.org [mailto:insight-users-bounces at itk.org]
On Behalf Of Yili Pan
Sent: Monday, August 10, 2009 12:13 PM
To: insight-users at itk.org
Subject: [Insight-users] Convert dicom to raw

 

Hi all ITK Gurus:

 

I am trying to render dicom volume, but it seems that I have to convert the
files to raw format first. How can I do that?

 

Is there any advice to render the dicom volume?

 

Thanks ^ ^

 

Best,

Yili Pan

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20090811/2b8707e5/attachment-0001.htm>


More information about the Insight-users mailing list