[Dcmlib] Pixel Representation =1

Mathieu Malaterre mathieu.malaterre at kitware.com
Tue Nov 14 16:22:31 CET 2006


JP,

	Do you want me to answer that ? Or are you preparing an answer ?

-M

zhou13 at netscape.net wrote:
>  Dear Jean:
> 
> I find this in gdcmFile.cxx.
> 
> /**
>  * \brief   Check whether the pixels are signed (1) or UNsigned (0) data.
>  * \warning The method defaults to false (UNsigned) when tag 0028|0103
>  *          is missing.
>  *          The responsability of checking this value is left to the caller
>  *          (NO transformation is performed on the pixels to make then >0)
>  * @return  True when signed, false when UNsigned
>  */
> bool File::IsSignedPixelData()
> {
>    std::string strSign = GetEntryValue( 0x0028, 0x0103 );
>    if ( strSign == GDCM_UNFOUND )
>    {
>       gdcmWarningMacro( "Pixel Representation (0028,0103) supposed to be "
>                       << "mandatory");
>       return false;
>    }
>    int sign = atoi( strSign.c_str() );
>    if ( sign == 0 )
>    {
>       return false;
>    }
>    return true;
> }
>  
> So, using GDCM doesn't guarantee that the signess of pixel will be 
> handled correctly.   People must actively  call this method and  custom  
> transform  the  value.    A better way would be hiding these details in 
> side the reader and people would always get the correct value regardless 
> of the Pixel Representation settings.
> 
> Regards,
> Li Zhou
> 
>  
> -----Original Message-----
> From: jpr at creatis.insa-lyon.fr
> To: zhou13 at netscape.net
> Cc: dcmlib at creatis.insa-lyon.fr
> Sent: Mon, 13 Nov 2006 9:21 PM
> Subject: Re: [Dcmlib] Pixel Representation =1
> 
> zhou13 at netscape.net <mailto:zhou13%40netscape.net> wrote: 
>  
>  > Hello list, 
>  > 
>  > Does GDCM correctly handle the Pixel Representation tag? When the > 
> Pixel Representation value is 1, the stored value in DICOM is two's > 
> complement ( 16 bit signed short ). I have been using VTK's DICOM > 
> reader but it can't handle this situation. 
>  
> I didn't know VTK's DICOM reader had this kind of trouble. 
> GDCM deals correctly with pixel representation. 
> GDCM comes with a vtkGdcmReader() , with the same API than vtk's DICOM 
> Reader. 
>  
>  > So i am investigating ITK's DICOM reader which is based on GDCM. I > 
> have some studies from a GE ProSpeed CT which actually set the Pixel > 
> Representation tag to 1. 
>  
> If you download gdcm, just use vtkgdcmViewer2 yourDicomFileName 
> to be sure it works. 
> You can have a look at the dicom header using : 
> PrintFile filein=yourDicomFileName 
>  
> HTH 
>  
> Jean-Pierre Roux 
> from gdcm team. 
>  
>  > 
>  > Thanks. 
>  > Li Zhou 
>  > 
>  > 
>  > > 
> ------------------------------------------------------------------------ 
>  > *Check Out the new free AIM(R) Mail* > 
> <http://pr.atwola.com/promoclk/100122638x1081283466x1074645346/aol?redir=http%3A%2F%2Fwww%2Eaim%2Ecom%2Ffun%2Fmail%2F 
> <http://pr.atwola.com/promoclk/100122638x1081283466x1074645346/aol?redir=http%3A%2F%2Fwww%2Eaim%2Ecom%2Ffun%2Fmail%2F>> 
>  > -- 2 GB of storage and industry-leading spam and email virus protection. 
>  > 
>  >------------------------------------------------------------------------ 
>  > 
>  >_______________________________________________ 
>  >Dcmlib mailing list 
>  >Dcmlib at creatis.insa-lyon.fr <mailto:Dcmlib%40creatis.insa-lyon.fr> 
>  >http://www.creatis.insa-lyon.fr/mailman/listinfo/dcmlib 
> <http://www.creatis.insa-lyon.fr/mailman/listinfo/dcmlib> 
>  > 
> ------------------------------------------------------------------------
> *Check Out the new free AIM(R) Mail* 
> <http://pr.atwola.com/promoclk/100122638x1081283466x1074645346/aol?redir=http%3A%2F%2Fwww%2Eaim%2Ecom%2Ffun%2Fmail%2F> 
> -- 2 GB of storage and industry-leading spam and email virus protection.
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> 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