The READ_DICOM function reads an image from a DICOM file along with any associated color table.The return array type depends on the DICOM image pixel type.
This routine is written in the IDL language. Its source code can be found in the file read_dicom.pro in the lib subdirectory of the IDL distribution.
Result = READ_DICOM (Filename [, Red, Green, Blue] [, IMAGE_INDEX=index] [, /DICOMEX] )
The return value can be a 2-D array for grayscale or a 3-D array for TrueColor images. TrueColor images are always returned in pixel interleave format. The return value will be 0 (zero) if Filename is not a valid DICOM file.
This argument is a scalar string that contains the full pathname of the file to read.
Red, Green, Blue
Named variables that will contain the red, green, and blue color vectors from the DICOM file if they exist.
Note: DICOM color vectors contain 16- bit color values that may need to be converted for use with IDL graphics routines.
Set this keyword to the index of the image to read from the file.
By default, if the IDLffDicomEx object is available, IDL uses the IDLffDicomEx object to read the DICOM file. If this object is not available or if this keyword is set to 0, IDL uses the IDLffDICOM object to read the DICOM file.
Note: READ_DICOM always returns the image array in DICOM format where the first pixel in the returned array is the top left-hand pixel in the frame. This is different than the IDLffDicomEx::GetPixelData method, which returns pixel data in standard IDL format where the first pixel in the returned array is the bottom left-hand pixel in the frame.
Added DICOMEX keyword