[Dcmlib] how to tell whether the dicom is signed or unsigned

Jean-Pierre Roux Jean-Pierre.Roux at creatis.insa-lyon.fr
Tue Oct 25 12:03:52 CEST 2005


acid wrote:

>dear sir,
>I am a begginger in dicom,and I have a read dicom function developed based on gdcm library,
>and it can only support 8/12/16bits,
>  
>
I suppose somewhere the function uses
uint8_t *FileHelper::GetImageData();
method.

uint8_t * is just for prototyping.
You have to cast the result according to the actual image type.
Is returned by
std::string GetPixelType();
method.
Possible values are :

* - "8U" unsigned 8 bit,
* - "8S" signed 8 bit,
* - "16U" unsigned 16 bit,
* - "16S" signed 16 bit,

HTH.

Jean-Pierre Roux

>and I dont know how to make sure whether the loaded file is signed or unsigned format,
>and how to process signed format image,
>I wonder if you can help me out of here,
>very very appreciate your help!!
>
>
>Sincerely,Alison
>
>_______________________________________________
>Dcmlib mailing list
>Dcmlib at creatis.insa-lyon.fr
>http://www.creatis.insa-lyon.fr/mailman/listinfo/dcmlib
>
>  
>




More information about the Dcmlib mailing list