[Insight-users] Convert dicom to raw

Yang, Jinzhong jinzhong76 at gmail.com
Tue Aug 11 19:16:19 EDT 2009


No sure why you want to write out in vtk format. If you just want to
visualize the image, check the example in the 

InsightApplications

Auxiliary/vtk/itkReadITKImageShowVTK.cxx

 

-Jinzhong

 

From: Yili Pan [mailto:pyl0420 at gmail.com] 
Sent: Tuesday, August 11, 2009 4:30 PM
To: Yang, Jinzhong
Cc: insight-users at itk.org
Subject: Re: [Insight-users] Convert dicom to raw

 

Hi,

 

I've already convert the dicom volume to .raw format using MRIconvert. The
next step is to write it in .vtk format. Is there any way to realize that??

 

Thank you Jinzhong ^ ^

and thanks in advance

 

Best,

Yili

 

On Tue, Aug 11, 2009 at 3:14 PM, Yang, Jinzhong <jinzhong76 at gmail.com>
wrote:

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/cb66e7e9/attachment.htm>


More information about the Insight-users mailing list