Thursday, June 20, 2013
Google Custom Search

Our Community

Membership Membership:
Latest New User Latest: mehdi9935
New Today New Today: 0
New Yesterday New Yesterday: 17
User Count Overall: 28917

People Online People Online:
Visitors Visitors: 9
Members Members: 0
Total Total: 9

Online Now Online Now:

ClearCanvas Community Forums

Change PixelData value!
Last Post 2012-08-17 02:10 AM by kangkang08. 3 Replies.
Printer Friendly
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages Resolved
kangkang08
Basic Member
Basic Member
Posts:16

--
2012-08-08 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
stewart
Senior Member
Senior Member
Posts:2347

--
2012-08-13 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.
Live and real-time support available for Personal and Team Edition customers
kangkang08
Basic Member
Basic Member
Posts:16

--
2012-08-14 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!

kangkang08
Basic Member
Basic Member
Posts:16

--
2012-08-17 02:10 AM  

thanks man! I found the solutions about this question!

You are not authorized to post a reply.

Active Forums 4.1
Copyright 2013 ClearCanvas Inc. All Rights Reserved