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