From: jpr Date: Wed, 11 Jul 2007 12:21:01 +0000 (+0000) Subject: Add a comment about a patch to be able to reda wrong images, wher UN length is X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=bef512a69f6a9c53b2d1e6eef1c54babe4daa19e;hp=64989a874c28cea9b6c4a7a16d55d0bff269ff10;p=gdcm.git Add a comment about a patch to be able to reda wrong images, wher UN length is coded on 2 bytes. // WARNING : // // For some images, length of UN elements is coded on 2 bytes (instead of 4) // There are *not* readable ! // You can make a quick and dirty patch, commenting out //| vr == "UN" // in the following line. // (the 'straight' images will no longer be readable ...) if ( vr == "OB" || vr == "OW" || vr == "SQ" || vr == "UT" || vr == "UN" || changeFromUN == true) { --- diff --git a/src/gdcmDocument.cxx b/src/gdcmDocument.cxx index a52ab8cd..32e52d4a 100644 --- a/src/gdcmDocument.cxx +++ b/src/gdcmDocument.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDocument.cxx,v $ Language: C++ - Date: $Date: 2007/06/18 15:44:52 $ - Version: $Revision: 1.362 $ + Date: $Date: 2007/07/11 12:21:01 $ + Version: $Revision: 1.363 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -1513,8 +1513,18 @@ void Document::FindDocEntryLength( DocEntry *entry ) uint16_t length16; if ( Filetype == ExplicitVR && !entry->IsImplicitVR() ) { + + // WARNING : + // + // For some images, length of UN elements is coded on 2 bytes (instead of 4) + // There are *not* readable ! + // You can make a quick and dirty patch, commenting out + //| vr == "UN" + // in the following line. + // (the 'straight' images will no longer be readable ...) + if ( vr == "OB" || vr == "OW" || vr == "SQ" || vr == "UT" - || vr == "UN" || changeFromUN == true) + || vr == "UN" || changeFromUN == true) { changeFromUN = false; // The following reserved two bytes (see PS 3.5-2003, section