[Insight-users] how to read multilayer DICOM

Mathieu Malaterre mathieu.malaterre at gmail.com
Thu Jun 21 13:38:06 EDT 2007


Yao,

  Could you please send us the code you used to try to read the DICOM
file ? In your email you are talking about some lenght and block data,
please specify section of the ITK Software Guide you are referring to,
this will help us a lot.

  All you need to do is the very usual ITK code:


  typedef signed short    PixelType;
  const unsigned int      Dimension = 3;

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

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

  reader->SetFileName( argv[1] );

  try
    {
    reader->Update();
    }
  catch (itk::ExceptionObject &excp)
    {
    std::cerr << "Exception thrown while writing the image" << std::endl;
    std::cerr << excp << std::endl;
    return EXIT_FAILURE;
    }

HTH
-Mathieu

On 6/21/07, Yao, Weiguang <wyao at hrsrh.on.ca> wrote:
>
>
>
> Steve and all:
>
> Do you have any idea to read a multi-frame DICOM file?
>
> I guess that for a single 2D DICOM image reader, the length of
> the block data which will be read in is determined by the
> dimensions of the image. If I can find the place to modify
> the length, maybe I could use the 2D image reader to read
> a multi-frame file. Do you know which file and where I can
> find the assignation of the length? Thanks.
>
> Weiguang
>
> -----Original Message-----
> From: Steve M. Robbins [mailto:steve at sumost.ca]
> Sent: Thursday, June 21, 2007 11:11 AM
> To: Yao, Weiguang
> Subject: Re: [Insight-users] how to read multilayer DICOM
>
>
> Hi,
>
> I'm pretty sure you mean multi-frame.  I just looked through the
> DICOM standard part 3
> (http://medical.nema.org/dicom/2007/07_03pu.pdf)
> and there is no mention of multi-layer.
>
> Regards,
> -Steve
>
> On Thu, Jun 21, 2007 at 08:32:37AM -0400, Yao, Weiguang wrote:
> > Hi Steve:
> >
> > For a normal 2D image file in DICOM format, it consists of the header and
> > the body in which there is the 2D data for one slice. My file consists of
> > one header but many slices of 2D data in the body. Maybe it should be
> > called multiframe.
> >
> > Thanks.
> >
> > Weiguang
> >
> > -----Original Message-----
> > From: Steve M. Robbins [mailto:steve at sumost.ca]
> > Sent: Wednesday, June 20, 2007 6:02 PM
> > To: Yao, Weiguang
> > Subject: Re: [Insight-users] how to read multilayer DICOM
> >
> >
> > On Wed, Jun 20, 2007 at 05:58:12PM -0400, Yao, Weiguang wrote:
> > > Hi,
> > >
> > > Can anyone tell me how to read a multilayer DICOM file? The file
> consists
> > of
> > > one header and many slices data.
> >
> > I don't know what a multilayer file is; did you mean "multiframe"?
> >
> > I don't know the answer, in any case, but you might want to clarify
> > your question on the list.
> >
> > -Steve
> >
> >
> **********************************************************************
> > The information contained in this email and document(s)attached are for
> the
> > exclusive use of the addressee and may contain confidential, privileged
> and
> > non-disclosable information. If the recipient of this e-mail is not the
> > addressee, such recipient is strictly prohibited from reading,
> photocopying,
> > distributing or otherwise using this e-mail or its content in any way.
> **********************************************************************
> The information contained in this email and document(s)attached are for the
> exclusive use of the addressee and may contain confidential, privileged and
> non-disclosable information. If the recipient of this e-mail is not the
> addressee, such recipient is strictly prohibited from reading, photocopying,
> distributing or otherwise using this e-mail or its content in any way.
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
>
>


-- 
Mathieu


More information about the Insight-users mailing list