comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » SetPixelData Error
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
SetPixelData Error [message #56114] Tue, 02 October 2007 13:34 Go to next message
Aks is currently offline  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 Go to previous message
Robbie is currently offline  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/
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: David's TVSCALE
Next Topic: IDL Help with Reading EOS-HDF Files

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 19:39:42 PDT 2025

Total time taken to generate the page: 0.00584 seconds