Program: gdcm
Module: $RCSfile: gdcmDocument.cxx,v $
Language: C++
- Date: $Date: 2005/10/27 18:12:40 $
- Version: $Revision: 1.318 $
+ Date: $Date: 2005/11/03 14:39:47 $
+ Version: $Revision: 1.322 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
/// In order to fix things "Quick and Dirty" the dictionary was
/// altered on PURPOSE but now contains a WRONG value.
/// In order to fix things and restore the dictionary to its
- /// correct value, one needs to decided of the semantics by deciding
+ /// correct value, one needs to decide of the semantics by deciding
/// whether the following tags are either :
/// - multivaluated US, and hence loaded as ValEntry, but afterwards
/// also used as BinEntry, which requires the proper conversion,
Global::GetVR()->GetAtomicElementLength(entry->GetVR());
// FIXME : trouble expected if we read an ... OW Entry (LUT, etc ..)
- if( entry->GetVR() == "OW" )
- vrLgth = 1;
+// if( entry->GetVR() == "OW" )
+// vrLgth = 1;
switch(vrLgth)
{
case 1:
{
- gdcmDebugMacro( "Atomic lgt = 1 ; NO swap at reading");
break;
}
case 2:
}
/**
- * \brief Re-computes the length of a ACR-NEMA/Dicom group from a DcmHeader
+ * \brief Re-computes the length of the Dicom group 0002.
*/
int Document::ComputeGroup0002Length( )
{
{
vr = entry->GetVR();
- // FIXME : group 0x0002 is *always* Explicit VR!
- // --> Except for Implicit VR Transfer Syntax (GE Private) !!
-
- //if ( filetype == ExplicitVR )
- //{
//if ( (vr == "OB")||(vr == "OW")||(vr == "UT")||(vr == "SQ"))
// (no SQ, OW, UT in group 0x0002;)
if ( vr == "OB" )
// explicit VR AND (OB, OW, SQ, UT) : 4 more bytes
groupLength += 4;
}
- //}
+
groupLength += 2 + 2 + 4 + entry->GetLength();
}
}
if ( !CheckDocEntryVR(vr) )
{
- gdcmWarningMacro( "Unknown VR " << std::hex << "0x("
+ // Don't warn user with useless messages
+ if ( vr[0] != 0xff || vr[1] != 0xff )
+ gdcmWarningMacro( "Unknown VR " << std::hex << "0x("
<< (unsigned int)vr[0] << "|" << (unsigned int)vr[1]
<< ") at offset :" << positionOnEntry );
Fp->seekg(positionOnEntry, std::ios::beg);