Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

3D CT image reconstruction by 2D slices

537 views
Skip to first unread message

Amadeus

unread,
Oct 9, 2012, 9:17:08 AM10/9/12
to
I know there are lots of questions related to this topic. But maybe because of my ignorance, I could not use any of them successfully. Hence I wanted to ask the same question again:

I have 2D slices of a 3D CT image. They are in DICOM format and there are 250 of them. I want to reconstruct the 3D image with MATLAB. How can I do this in a loop?


I am using MATLAB R2010b on my Ubuntu system.
Images' location is: /home/amadeus/Desktop/images
Their names go like: IM-0001-0001.dcm, IM-0001-0002.dcm, IM-0001-0003.dcm, .... ,IM-0001-0250.dcm


Regards,
Amadeus

Matt J

unread,
Oct 9, 2012, 10:07:07 AM10/9/12
to
"Amadeus" wrote in message <k5184k$136$1...@newscl01ah.mathworks.com>...
> I know there are lots of questions related to this topic. But maybe because of my ignorance, I could not use any of them successfully. Hence I wanted to ask the same question again:
>
> I have 2D slices of a 3D CT image. They are in DICOM format and there are 250 of them. I want to reconstruct the 3D image with MATLAB. How can I do this in a loop?
===========

But you said you already have "2D slices of a 3D CT image". That seems to say that the 3D image is already reconstructed.

Perhaps you meant to say that you have 2D projections. If so, you can probably reconstruct the image slice-by-slice using IFANBEAM in the Image Processing Toolbox, although I've never tried this command. I always implement my own reconstruction algs.

Amadeus

unread,
Oct 9, 2012, 10:31:07 AM10/9/12
to
"Matt J" wrote in message <k51b2b$d1a$1...@newscl01ah.mathworks.com>...

> But you said you already have "2D slices of a 3D CT image". That seems to say that the 3D image is already reconstructed.
>
> Perhaps you meant to say that you have 2D projections. If so, you can probably reconstruct the image slice-by-slice using IFANBEAM in the Image Processing Toolbox, although I've never tried this command. I always implement my own reconstruction algs.

You are right, I have 2D projections.

What do you mean by reconstruction algorithms? I mean, is not only one simple algorithm enough for that? Are there different methods to create 2D projections of a 3D CT image which requires different algorithms to reconstruct the image? If so, I do not know the way how my 2D projections are constructed therefore I do not know which inverse transform I should use.

Matt J

unread,
Oct 9, 2012, 11:03:08 AM10/9/12
to
"Amadeus" wrote in message <k51cfb$j4f$1...@newscl01ah.mathworks.com>...
> "Matt J" wrote in message <k51b2b$d1a$1...@newscl01ah.mathworks.com>...
>
> > But you said you already have "2D slices of a 3D CT image". That seems to say that the 3D image is already reconstructed.
> >
> > Perhaps you meant to say that you have 2D projections. If so, you can probably reconstruct the image slice-by-slice using IFANBEAM in the Image Processing Toolbox, although I've never tried this command. I always implement my own reconstruction algs.
>
> You are right, I have 2D projections.
>
> What do you mean by reconstruction algorithms? I mean, is not only one simple algorithm enough for that? Are there different methods to create 2D projections of a 3D CT image which requires different algorithms to reconstruct the image?
=============

The reconstruction algorithm has to be tailored to the scan geometry. For example, if your 2D projections come from a helical, fanbeam scan, you would need a different algorithm than if the projections came from a circular cone beam scan, or from a liimited-angle breast CT scan. Also, even for the same scan geometry, some algorithms are known to produce better image quality than others, although they usually come at the cost of slower computation. There are lots of papers proposing different methods.

>If so, I do not know the way how my 2D projections are constructed therefore I do not know which inverse transform I should use.
===================

You'll need to find out, but I'm guessing that it came from a helical scan, and I'm guessing that the x-ray measurements have already been rebinned so that each row of the 2D projections is the fanbeam projection of a different slice of the patient volume. If I'm correct, then you can reconstruct one slice of the patient at a time by applying IFANBEAM.

Nasser M. Abbasi

unread,
Oct 9, 2012, 11:25:06 AM10/9/12
to
On 10/9/2012 9:31 AM, Amadeus wrote:

>
> What do you mean by reconstruction algorithms?

I think you should first learn more about this subject. Why not start with
the simpler problem of using 1D images to reconstruct 2D?

reconstructing 3D from 2D is much harder.

--Nasser

Amadeus

unread,
Oct 9, 2012, 11:27:08 AM10/9/12
to
"Matt J" wrote in message <k51ebc$qmd$1...@newscl01ah.mathworks.com>...
>
> You'll need to find out, but I'm guessing that it came from a helical scan, and I'm guessing that the x-ray measurements have already been rebinned so that each row of the 2D projections is the fanbeam projection of a different slice of the patient volume. If I'm correct, then you can reconstruct one slice of the patient at a time by applying IFANBEAM.

Thank you so much your help. I will try to reconstruct the image by using IFANBEAM.
One last question: is there a way to understand which method used to construct the 2D projections? I checked DICOM header, but there does not exist.

Matt J

unread,
Oct 9, 2012, 1:54:07 PM10/9/12
to
"Amadeus" wrote in message <k51fob$3a2$1...@newscl01ah.mathworks.com>...
===========

It doesn't say what machine was used to perform the scan?

Jeff Mather

unread,
Oct 9, 2012, 2:28:08 PM10/9/12
to
> I have 2D slices of a 3D CT image. They are in DICOM format and there are 250 of
> them. I want to reconstruct the 3D image with MATLAB. How can I do this in a loop?
[snip]
> Images' location is: /home/amadeus/Desktop/images
> Their names go like: IM-0001-0001.dcm, IM-0001-0002.dcm, IM-0001-0003.dcm, ....
> IM-0001-0250.dcm

I'm going to go out on a limb and say that the 2D slices you have don't need "reconstruction," per se. They probably just need to be put into one brick of data. If the slices are the same size and already in Z-order by filename, then it's pretty straightforward.

meta = dicominfo('IM-0001-0001.dcm');
data = zeros([meta.Height, meta.Width, 250], 'int16');
for p = 1:250
fname = sprintf('IM-0001-%04d.dcm', p);
data(:,:,p) = dicomread(fname);
end

Just remember as you're working with this data that the X and Y pixel spacing is probably much, much finer than the Z spacing.

Jeff

Matt J

unread,
Oct 9, 2012, 3:35:08 PM10/9/12
to
"Amadeus" wrote in message <k51cfb$j4f$1...@newscl01ah.mathworks.com>...
> "Matt J" wrote in message <k51b2b$d1a$1...@newscl01ah.mathworks.com>...
>
> > But you said you already have "2D slices of a 3D CT image". That seems to say that the 3D image is already reconstructed.
> >
> > Perhaps you meant to say that you have 2D projections. If so, you can probably reconstruct the image slice-by-slice using IFANBEAM in the Image Processing Toolbox, although I've never tried this command. I always implement my own reconstruction algs.
>
> You are right, I have 2D projections.
==============

I'm starting to think Jeff was right. If the slices you said you have are cross sectional images of patient anatomy, then you do not have "2D projections".

The term 2D projections refers to the image you get when you shoot X-rays through a patient and measure what comes out the other side with an X-ray detector. It is an image showing the x-ray 'shadow' cast by an object on a 2D surface.

The term "reconstruction" means deriving a 3D image volume from a collection of 2D projections taken from different x-ray camera positions.

Amadeus

unread,
Oct 9, 2012, 3:39:08 PM10/9/12
to
"Jeff Mather" <jeff....@mathworks.com> wrote in message
> I'm going to go out on a limb and say that the 2D slices you have don't need "reconstruction," per se. They probably just need to be put into one brick of data. If the slices are the same size and already in Z-order by filename, then it's pretty straightforward.
>
> meta = dicominfo('IM-0001-0001.dcm');
> data = zeros([meta.Height, meta.Width, 250], 'int16');
> for p = 1:250
> fname = sprintf('IM-0001-%04d.dcm', p);
> data(:,:,p) = dicomread(fname);
> end
>
> Just remember as you're working with this data that the X and Y pixel spacing is probably much, much finer than the Z spacing.
>
> Jeff


Jeff, thank you so much for your help. Now, how can I view the 3D image that I have created? Imshow does not work.

Matt J

unread,
Oct 9, 2012, 3:45:08 PM10/9/12
to
"Amadeus" wrote in message <k51ugs$3rf$1...@newscl01ah.mathworks.com>...
>
>
> Jeff, thank you so much for your help. Now, how can I view the 3D image that I have created? Imshow does not work.
============

You have a number of choices on the FEX for 3D viewers:

http://www.mathworks.com/matlabcentral/fileexchange/index?utf8=%E2%9C%93&term=slice+viewer

Matt J

unread,
Oct 9, 2012, 3:49:07 PM10/9/12
to
"Amadeus" wrote in message <k51ugs$3rf$1...@newscl01ah.mathworks.com>...
>
>
> Jeff, thank you so much for your help. Now, how can I view the 3D image that I have created? Imshow does not work.
===========

People seem reasonably happy with this:

http://www.mathworks.com/matlabcentral/fileexchange/21881-image3
0 new messages