Skip to main content

3D view of DICOM Images

10 replies [Last post]
shihabkb
Offline
Joined: 2008-12-31

Dear Friends,

I have a general question. I am writing a dicomviewer. I want to display dicom imges in a 3D view. I have some slices of images as buffered image or planar image. I want to create a 3D view of those images in 3D view.

Which technology should I use this for, Java 3D or JOGL. Any body done this earlier. Could you please help me

regards
Shihab

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
fandengyu
Offline
Joined: 2012-01-05

Dear shihabkb ,

I Know you have do lots about dicom 3d view , Do you do it all right now ? I study it for a simall time ,its hard for me now ,Could you please help me ?

regards

fandengyu

email:fandengyu114@126com

chaose71
Offline
Joined: 2008-04-15

Dear Shihab,

To be able to answer your question, you have to ask more precisely. What exactly do you want to display? A (single) plain image scaled with image spacing/slice thickness? Orthoslice-Mode or (texture based) Direct Volume Rendering of the whole stack of images? An isosurface for a given voxel value?

There are many, many ways to visualize DICOM data. Do you have a specific application im mind?

Regards;
ChaosE71

shihabkb
Offline
Joined: 2008-12-31

Dear Chaos,

Thanks you for your reply. I am new guy to dicom and j3d. I am writing a dicom viewer. It is for my study/research purpose. I m started reading of dicom books and all. I have displayed some dicom images from dicom files. Now I want to display dicom images from dicomdir or a folder containing dicom files as a 3d view and planning to rotate that. From your question I think that it is Direct Volume Rendering of the whole stack of images. Hope you got my issue. Could you please try to answer my question when you get some time?

By the by when you are releasing the beta of YetAnotherDicomViewer? Waiting to see that...

Thanks and Regards
Shihab

chaose71
Offline
Joined: 2008-04-15

2D Texture approach: Load your images and map them onto rectangular planes. For best visual quality, map them on sagittal, transveral and frontal planes. Scaling and plane distance depend on the DICOM files, they contain tags (0028,0030) with the spacing in x, y and z-direction, including an optinal gap between slices. You can use the window width/center to scale the intensity values to 0-255 and use them as alpha values for your plane textures. The approach is a bit memory consuming but guarantees interactive frame rates.

In a 3D Texture approach, you do the same, just that you use a single 3d Texture and instead of rotating the planes, you rotate the texture coordinates. Faster and less memory consuming than the 2D-Texture approach, also better visual quality, but strongly depends on if and how good your GFX card supports it.

[url=http://www.welfenlab.de/en/research/fields_of_research/yadiv/]YaDiV[/url] has already implemented both, so you can take a peak there. There is also a great DICOM [url=http://newsgroups.derkeiler.com/Archive/Comp/comp.protocols.dicom/]mailing list[/url] out there, answering almost every question you might have.

ChaosE71

shihabkb
Offline
Joined: 2008-12-31

Dear Chaose,

I have downloaded and worked your YaDIV. Its worked fine.

I am really sorry if I am disturbing you.

Could you please check my below code? I am trying to display 8 images as a 3d view.
I have created array of buffered images and set that array to ImageComponent3D. Could you please check this and tell me what modification should I doen for this code to work. I know you are very busy there. But please help me when you get free time.

I have used Box object in my code. But it is not worked. Which geometry object shoud I use this for?

[code]
BranchGroup objRoot = new BranchGroup();

// Create a transform group to center the object
TransformGroup objOrient = new TransformGroup();
Transform3D orient = new Transform3D();
orient.set(new Vector3d(-0.25, -0.0, -0.0), 0.5);
objOrient.setTransform(orient);
objRoot.addChild(objOrient);

// Create a transform group node and initialize it to the identity.
// Enable the TRANSFORM_WRITE capability so that our behavior code
// can modify it at runtime. Add it to the root of the subgraph.
//
TransformGroup objTrans = new TransformGroup();

objTrans.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);
objOrient.addChild(objTrans);

//
// Create a 3D texture
//
int width = 256;
int height = 256;
int depth = 8;

BufferedImage[] bImage = new BufferedImage[8];

bImage = getBuImagesFor3D();

int format = Texture.LUMINANCE_ALPHA;
Texture3D tex = new Texture3D(Texture.BASE_LEVEL,format
, width, height, depth);
//tex.setImage(0, pArray);
tex.setEnable(true);
tex.setMinFilter(Texture.BASE_LEVEL_LINEAR);
tex.setMagFilter(Texture.BASE_LEVEL_LINEAR);
tex.setBoundaryModeS(Texture.CLAMP);
tex.setBoundaryModeT(Texture.CLAMP);
tex.setBoundaryModeR(Texture.CLAMP);
format = ImageComponent.FORMAT_LUM8_ALPHA8;
boolean byRef = true;
ImageComponent3D iComp = new ImageComponent3D(format, bImage, byRef, true);
tex.setImage(0, iComp);
// turn off face culling and lighting so we an see just the texture
PolygonAttributes p = new PolygonAttributes();
p.setCullFace(PolygonAttributes.CULL_NONE);
Material m = new Material();
m.setLightingEnable(false);

// create an appearance with the texture but no tex coord gen
Appearance coordsAppearance = new Appearance();
coordsAppearance.setTexture(tex);
coordsAppearance.setMaterial(m);
coordsAppearance.setPolygonAttributes(p);

//-----------------------------

Box BoxObj = new Box( 1f, 1f, 0.8f, Box.GENERATE_NORMALS |
Box.GENERATE_TEXTURE_COORDS |
Box.GENERATE_TEXTURE_COORDS_Y_UP, coordsAppearance);

objTrans.addChild(BoxObj);
objRoot.compile();

return objRoot;
[/code]

Thanks and Regards
Shihab

mcneillk
Offline
Joined: 2005-02-03

Please see my DICOM post in this forum.

shihabkb
Offline
Joined: 2008-12-31

u mean J3DWorkbench project?

mcneillk
Offline
Joined: 2005-02-03

Yes.

aces
Offline
Joined: 2003-07-17

use Search in this forum.
There is a post about a interesting DiCOM application .

Bad english. Fixed text.

Message was edited by: aces

shihabkb
Offline
Joined: 2008-12-31

Thanks for your answer. I find one post regardind DICOM in this forum. From that I came to know that usign Java 3D it is possible to load DICOM images in 3D view.

Could you plz answer my questios below?

I not familiar with Java 3D. Thats Y I am askign you this silly questions. Please excuse me .

I have a dicomdir and from that I can get slices of images. Like bufferedimage or JAI Planar image. For example I have 30 peice of images. I want to display these images in 3D view. Could you please tell me how it is possible. Do you have any sample?

Thanks and Regards
Shihab