Friday, February 10, 2012
Google Custom Search

ClearCanvas Highlights

Download our Open Source software
Watch some Videos
Get the Source
Check out our Licensing
Join our  Forums
Some Research: OICR IPP-Trials

Our Community

Membership Membership:
Latest New User Latest: 孙磊
New Today New Today: 1
New Yesterday New Yesterday: 27
User Count Overall: 20591

People Online People Online:
Visitors Visitors: 12
Members Members: 2
Total Total: 14

Online Now Online Now:
01: dgicovate
02: 孙磊

ClearCanvas Community Forums

Image processing - accessing gray values
Last Post 2010-06-17 06:44 AM by jonas. 2 Replies.
Printer Friendly
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
jonas
Basic Member
Basic Member
Posts:17

--
2010-06-08 05:06 AM  

 I'm using the ClearCanvas.Dicom library in my application and working on a project only containing gray value images (CT and RTDose). I'm impress how easy DICOM can be i C# - thank you guys.

I would like to access the decompressed image data from the DICOM file and load the gray values (HU as integers) or dose (doubles). I need to do some image processing (enhancement, segmentation and registration) using a seperate numerical library.

I do NOT need W/L or any references to the ImageViewer like drawing the bitmap as suggested elsewhere in the forum:

ImageSop imgSop = new ImageSop(fname); Frame frame = imgSop.Frames[1];
IPresentationImage pi = PresentationImageFactory.Create(frame);
Bitmap bmp = pi.DrawToBitmap(frame.Columns, frame.Rows);

So, how do I get the gray values - will DicomPixelData do the job?

stewart
Senior Member
Senior Member
Posts:2033

--
2010-06-16 01:02 PM  
Have a look at the method ClearCanvas.ImageViewer.RoiGraphics.RoiStatistics.CalculateMean - it shows how to inspect the pixel data and then process it through the modality LUT, the output of which for CT is HU.

I'm not that familiar with the RTDose stuff, so I can't really help you there.

Hope this helps,
Stewart
Real-time support available to Clinical Edition and Team Edition customers
jonas
Basic Member
Basic Member
Posts:17

--
2010-06-17 06:44 AM  

Thanks you for the tip. I have copied a possible solution from the ClearCanvas.ImageViewer.RoiGraphics.Roi() constructor:

IImageGraphicProvider provider = pi as IImageGraphicProvider;
// ... some code
PixelData _pixelData = provider.ImageGraphic.PixelData;
// ... process image pixels

Unfortunately this involves references to the ImageServer, but is it possible to access the uint16 gray values using only the DICOM library?

 

You are not authorized to post a reply.

Active Forums 4.1
Copyright 2011 ClearCanvas Inc.