Do you have a question?

First Name:
Surname:
Email:
Phone:
Message:
Get Audio Code

Change PixelData value!
Last Post 17 Aug 2012 02:10 AM by Kange K. 3 Replies.
Printer Friendly
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages Resolved
Kange KUser is Offline
New Member
New Member
Posts:16

--
08 Aug 2012 03:48 AM  

Hello Big Coder:

I want to change dicom file with it's pixeldatas.

Directly,that is change it inner image.

But I cann't find some methods in CC program what I can use!

Also I can not understand the property of "Rows" and "Colunms"

Please help me!Thx!

 

Tags: pixeldata
stewartUser is Offline
Veteran Member
Veteran Member
Posts:2359

--
13 Aug 2012 12:14 PM  
Once you've loaded a DICOM file, you can do something like this:

var pd = new DicomUncompressedPixelData(file.DataSet);
byte[] frame = pd.GetFrame(1);
var rows = file.DataSet[DicomTags.Rows].GetInt32(...);
columns ... get it like rows.
bitsAllocated ... get it like rows.

There's a class in the ImageViewer that you can use to manipulate pixel data directly.

var pd2 = new ClearCanvas.ImageViewer.Imaging.PixelData(rows, columns, bitsAllocated, frame);

This class has Get/Set Pixel methods.

Rows and Columns is the height and width of the image.
Kange KUser is Offline
New Member
New Member
Posts:16

--
14 Aug 2012 11:55 PM  

Sorry! I can learn much from U means!

The simplest, I wan to convert a jpeg or bmp Image to 'pixelData'——array[].

what methods I can use!

Kange KUser is Offline
New Member
New Member
Posts:16

--
17 Aug 2012 02:10 AM  

thanks man! I found the solutions about this question!

You are not authorized to post a reply.

Active Forums 4.1