[Insight-users] how to read multilayer DICOM
Yao, Weiguang
wyao at hrsrh.on.ca
Thu Jun 21 14:22:17 EDT 2007
Mathieu:
The code I use is similar to yours, and I used Dimension = 3, but
it didn't work. The program cored down when I asked for the pixelValue
out of the range of the first slice, for example, at pixelIndex[2] = 1,
or if pixelIndex[2] = 0 but pixelIndex[0] and pixelIndex[1] are greater
than the range of the first slice.
Weiguang
-----Original Message-----
From: Mathieu Malaterre [mailto:mathieu.malaterre at gmail.com]
Sent: Thursday, June 21, 2007 1:38 PM
To: Yao, Weiguang
Cc: insight-users at itk.org
Subject: Re: [Insight-users] how to read multilayer DICOM
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
**********************************************************************
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20070621/a3b4f7a2/attachment.html
More information about the Insight-users
mailing list