[Dcmlib] Global::GetVR()->IsVROfBinaryRepresentable(vr)
Jean-Pierre ROUX
jean-pierre.roux at creatis.insa-lyon.fr
Wed Oct 19 00:52:26 CEST 2005
At 17:16 -0400 18/10/05, Mathieu Malaterre wrote:
>Hello,
>
> I have some trouble understanding this piece of code,
>gdcmDocument.cxx line 1003
Well ...
Very often, a file claimed as 'Explicit Value Representation' miss
the VR in a few Tags to be *really* Explicit VR.
If the file is supposed to be Explicit VR (if Filetype == ExplicitVR)
and
if, for a given Dicom Element, the 2 first bytes, following the 4
bytes (2+2) Tag, stored in the variable vr,
don't correspond to a VR (i.e. UI, PN, ULth SL, etc),
( !IsVROfBinaryRepresentable(vr) ), then the length (of *this*
DicomElement) is coded on 4 bytes, just as the File was implicit VR,
not on 2 bytes as in the 'true' Explicit VR.
JP
if ( Filetype == ExplicitVR &&
> !Global::GetVR()->IsVROfBinaryRepresentable(vr) )
> {
> ////// No DataEntry: should mean UNKOWN VR
> gdcmWarningMacro( std::hex << newDocEntry->GetGroup()
> << "|" << newDocEntry->GetElement()
> << " : No DataEntry."
> "Probably unknown VR.");
> }
>
>
>Comments ?
>
>Thanks,
>Mathieu
>_______________________________________________
>Dcmlib mailing list
>Dcmlib at creatis.insa-lyon.fr
>http://www.creatis.insa-lyon.fr/mailman/listinfo/dcmlib
Jean-Pierre ROUX
CREATIS - CNRS UMR 5515, INSERM U 630
Laboratoire de Radiologie Experimentale
Hopital Cardiologique
28 Avenue du Doyen LEPINE
B.P. Lyon-Montchat
69394 Lyon Cedex 03
Tel : (+33) 04 72 35 74 12
Fax : (+33) 04 72 68 49 16
URL : http://www.creatis.univ-lyon1.fr
e-mail : jpr at creatis.univ-lyon1.fr
More information about the Dcmlib
mailing list