Thursday, February 09, 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: tchlee
New Today New Today: 16
New Yesterday New Yesterday: 26
User Count Overall: 20579

People Online People Online:
Visitors Visitors: 14
Members Members: 4
Total Total: 18

Online Now Online Now:
01: okdicom
02: ednfran
03: larrywiding
04: yqtan

ClearCanvas Community Forums

Error : Parameter is not valid
Last Post 2010-08-09 12:51 PM by stewart. 1 Replies.
Printer Friendly
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
vsnaidu99
New Member
New Member
Posts:4

--
2010-07-30 02:52 AM  

 Hi,

 I want to get the physical images from  all frames of dicom file.

For that i implemented below code.

But i am getting error like parameter is not valid.

                ImageSop sop = new ImageSop("Path of  TestDicomFile");

                byte[] frameArray = sop.Frames[1].GetNormalizedPixelData();   -- here i am getting total frames are 25. 

from that i want to get the first frame.

                MemoryStream msFrame = new MemoryStream(frameArray);

                Image imgFramex = (Bitmap)Bitmap.FromStream(msFrame); -- in this line i am getting the error like "parameter is not vaild".

If i get image in any other way also , tell me how can i?

please help me some one.

 

 

stewart
Senior Member
Senior Member
Posts:2032

--
2010-08-09 12:51 PM  
DICOM pixel data is not encoded in a way that is compatible with Bitmaps, so your code will not work. Also, important information, like the Window/Level will not be applied. You should consider using the ImageViewer code to render the images to a bitmap for you using IPresentationImage.DrawToBitmap().
Real-time support available to Clinical Edition and Team Edition customers
You are not authorized to post a reply.

Active Forums 4.1
Copyright 2011 ClearCanvas Inc.