<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.2523" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial size=2><SPAN class=485403321-11112004>Hi,
Mathieu</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=485403321-11112004></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=485403321-11112004>It seems i have
found a serious bug after i do some testing.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=485403321-11112004></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=485403321-11112004>In the file
gdcmHeader.cxx, there are some codes as follows:</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=485403321-11112004></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=485403321-11112004> // beware of
trailing space at end of string <BR>
// DICOM tags are never of odd length<BR> if (
strPhotometricInterpretation == GDCM_UNFOUND ||
<BR> strPhotometricInterpretation ==
"MONOCHROME1 " || <BR>
strPhotometricInterpretation == "MONOCHROME2 " )<BR>
{<BR> return 1;<BR>
}</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=485403321-11112004></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=485403321-11112004>there is a space
added to the tail of "MONOCHROM1 " and "MONOCHROM2 ".</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=485403321-11112004>I have read
some file that there is no space added the tail, that will cause crash
when we set component number to 3.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=485403321-11112004></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=485403321-11112004>I think that
component number is important to read DICOM file, we can not just
set it to 3 if we can not identify it.(it is dangerous to
do memcpy)</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=485403321-11112004></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=485403321-11112004>And we can compare
the string value by following.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=485403321-11112004></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=485403321-11112004>std:string
strPINoSpace(strPhotometricInterpretation, 0,
strPhotometricInterpretation.find_first(' '));</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=485403321-11112004></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=485403321-11112004>if (
strPhotometricInterpretation == GDCM_UNFOUND
|| <BR> strPINoSpace ==
"MONOCHROME1" || <BR> strPINoSpace ==
"MONOCHROME2" )<BR> {<BR> return
1;<BR> }</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=485403321-11112004> </SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=485403321-11112004>I think that is more
robust. maybe that dicom file violates the DICOM conformance."DICOM tags
are never of odd length".</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=485403321-11112004></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=485403321-11112004>How do you think
about it?</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=485403321-11112004></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN
class=485403321-11112004>thx,</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=485403321-11112004></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN
class=485403321-11112004>Dennis</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=485403321-11112004> </SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=485403321-11112004> </SPAN></FONT></DIV></BODY></HTML>