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

Jean-Pierre Roux Jean-Pierre.Roux at creatis.insa-lyon.fr
Mon Nov 7 12:34:20 CET 2005


acid wrote:

>Dear sir
>Sorry to bother you again~
>I used Sante Dicom Viewer to read dicom and
>it can show many tags in the header which I dont know where they are put in the gdcm.
>In gdcmHeader,
>  
>
To get a given tag, you have to know its number
For instance, to get Patient's Name (why not?), if you know the tag is
"0010 0010", you just write

gdcm::File *f = gdcm::File::New();
f->SetFileName( fileName );
bool res = f->Load();

std::string patName = f->GetEntryString(0x0010,0x0010);

>we can know ,for example, width,height,channel number.
>  
>

--> If you don't know it, you can check for it in Dicts/dicomV3.dic.
*all* the dicom tags are there, with their *official* name.
The troubles start here !
For instance :
what you called "width" is probabely the field named "Window Width"
(0028 1051)
what you called "height" is probabely the field named "Window Center"
(0028 1050)

(the fields containing 'height' in their name are :
0018 1130 DS 1 Table Height
0018 1460 DS 1 Tomo Layer Height)

'channel number' should be (? -no idea about it :-( )
003a 0005 US 1 Number of Waveform Channels
003a 0202 IS 1 Waveform Channel Number


>But where can I find some specila tags if  I need them?
>For now I need to know pixel spacing,slice thickness, slice location,series description,
>  
>
0028 0030 DS 2 Pixel Spacing
(--> be carefull : in 'new' softwares, it also exist
0018 1164 DS 2 Imager Pixel Spacing
018 9322 FD 2 Reconstruction Pixel Spacing .
Be sure the one you have to use !

0018 0050 DS 1 Slice Thickness
0020 1041 DS 1 Slice Location
0008 1030 LO 1 Study Description
0008 103e LO 1 Series Description
etc

>but I have no clue where they are.
>
>Could you give me some hints?
>  
>
Have a look at Example/exExtractDicomTags.cxx
HTH.

Jean-Pierre

>Thank you very much.
>
>Sicerely,Alison
>
>
>-----Original Message-----
>From: Jean-Pierre Roux [mailto:Jean-Pierre.Roux at creatis.insa-lyon.fr]
>Sent: Tuesday, October 25, 2005 6:04 PM
>To: acid
>Cc: dcmlib at creatis.insa-lyon.fr
>Subject: Re: [Dcmlib] how to tell whether the dicom is signed or
>unsigned
>
>
>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