SetPixelData Error [message #56114] |
Tue, 02 October 2007 13:34  |
Aks
Messages: 4 Registered: October 2007
|
Junior Member |
|
|
Hi,
I tried using SetPixelData to write a 2D processed data into DICOM
image. I used the Bits_Allocated to be same as the information I read
from the header of the raw data (DICOM file).
oImg -> SetPixelData, image[*,*,i], BITS_ALLOCATED = uid2805,
PHOTOMETRIC_INTERPRETATION = 'MONOCHROME2',
SAMPLES_PER_PIXEL = 1, PIXEL_REPRESENTATION = 0, COLUMNS = imsize[1],
ROWS = imsize[2]
This is the error I get.
IDLFFDICOMEX::SETPIXELDATA: Error: Unable to set pixel data. Passed
in pixel data array length is not equal to the length of one frame.
(file), MR76000001.dcm
Can anybody tell me what this error means??
Thanks for your help.
|
|
|
Re: SetPixelData Error [message #56179 is a reply to message #56114] |
Thu, 04 October 2007 15:58  |
Robbie
Messages: 165 Registered: February 2006
|
Senior Member |
|
|
I'm guessing that you have specified an impossible image
representation based on the pixel data you are setting. Try using
SetPixelData without so many keywords.
oImg -> SetPixelData, reform(image[*,*,i],imsize[1],imsize[2]),
PHOTOMETRIC_INTERPRETATION = 'MONOCHROME2',
SAMPLES_PER_PIXEL = 1, PIXEL_REPRESENTATION = 0, COLUMNS =
imsize[1],
ROWS = imsize[2]
Robbie
http://www.barnett.id.au/idl/
|
|
|