[Dcmlib] FileHelper->GetImageData()

Jean-Pierre ROUX jean-pierre.roux at creatis.insa-lyon.fr
Fri Sep 2 20:48:16 CEST 2005


At 14:04 -0400 2/09/05, Greg Book wrote:
>I'm interested in using the GetImageData() function to read my files 
>instead of reading them by opening them and reading the bytes. Once 
>you've called this function and have an array of unsigned 
>integers... how is that array structured?
>Is it one byte for R, G, B? so 3 bytes per pixel? Then I assume line 
>breaks occur at pixel (3 byte) boundaries? So to read a 100x100pixel 
>image, I'd take the first 300 bytes of the buffer returned from 
>GetImageData as the first line of the image, then get the next 300 
>for the next line, and so on?

You're absolutely right.
In Dicom, there are 2 possibilities for RGB images :
- Storing 'Plane R + Plage G + Plane B'
- Storing pixels RGB RGB RGB ...

We choosed to convert them as RGB RGB RGB ...
(we convert YBR to RGB too).

Just be sure that field 'Samples per Pixel' value is 3.
JP

>
>Thanks,
>Greg
>_______________________________________________
>Dcmlib mailing list
>Dcmlib at creatis.insa-lyon.fr
>http://www.creatis.insa-lyon.fr/mailman/listinfo/dcmlib

   Jean-Pierre ROUX
   CREATIS - CNRS UMR 5515, INSERM U 630
   Laboratoire de Radiologie Experimentale
   Hopital Cardiologique
   28 Avenue du Doyen LEPINE
   B.P. Lyon-Montchat
   69394 Lyon Cedex 03
 
   Tel      : (+33) 04 72 35 74 12
   Fax      : (+33) 04 72 68 49 16
   URL      : http://www.creatis.univ-lyon1.fr
   e-mail   : jpr at creatis.univ-lyon1.fr
								   



More information about the Dcmlib mailing list