From: jpr Date: Wed, 7 Sep 2005 14:12:23 +0000 (+0000) Subject: Cosmetics for making ProntFile more clear when forceLoad was asked X-Git-Tag: Version1.2.bp~98 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=55e7ee6570c585377084dc59d134b2e99964b7dd;p=gdcm.git Cosmetics for making ProntFile more clear when forceLoad was asked --- diff --git a/src/gdcmBinEntry.cxx b/src/gdcmBinEntry.cxx index 3e150aaa..eb38569e 100644 --- a/src/gdcmBinEntry.cxx +++ b/src/gdcmBinEntry.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmBinEntry.cxx,v $ Language: C++ - Date: $Date: 2005/08/29 13:05:01 $ - Version: $Revision: 1.75 $ + Date: $Date: 2005/09/07 14:12:23 $ + Version: $Revision: 1.76 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -179,8 +179,9 @@ void BinEntry::Print(std::ostream &os, std::string const & ) } else { - s << " [" << GetValue() - << "; length = " << GetLength() << "]"; + //s << " [" << GetValue() + s << " [" << "gdcm::Loaded;OA " + << "length = " << GetLength() << "]"; } } } diff --git a/src/gdcmDocEntry.cxx b/src/gdcmDocEntry.cxx index 52692544..a584ae86 100644 --- a/src/gdcmDocEntry.cxx +++ b/src/gdcmDocEntry.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDocEntry.cxx,v $ Language: C++ - Date: $Date: 2005/09/07 08:52:58 $ - Version: $Revision: 1.67 $ + Date: $Date: 2005/09/07 14:12:23 $ + Version: $Revision: 1.68 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -109,7 +109,7 @@ void DocEntry::WriteContent(std::ofstream *fp, FileType filetype) //binary_write(*fp, shortLgr); //binary_write(*fp, z); -binary_write(*fp, lgth); + binary_write(*fp, lgth); } else { diff --git a/src/gdcmDocument.cxx b/src/gdcmDocument.cxx index 553f2a87..a4f702f6 100644 --- a/src/gdcmDocument.cxx +++ b/src/gdcmDocument.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDocument.cxx,v $ Language: C++ - Date: $Date: 2005/09/07 10:42:30 $ - Version: $Revision: 1.276 $ + Date: $Date: 2005/09/07 14:12:23 $ + Version: $Revision: 1.277 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -264,11 +264,11 @@ bool Document::DoTheLoadingDocumentJob( ) it != UserForceLoadList.end(); ++it) { - d = GetDocEntry( (*it).Group, (*it).Elem); - gdcmWarningMacro( "Force Load " << std::hex << (*it).Group << "|" <<(*it).Elem ); + d = GetDocEntry( (*it).Group, (*it).Elem); + if ( d == NULL) { gdcmWarningMacro( "You asked toForce Load " << std::hex @@ -283,9 +283,11 @@ bool Document::DoTheLoadingDocumentJob( ) continue; } - if ( dynamic_cast(d) ) + BinEntry *b = dynamic_cast(d); + if ( b ) { - LoadEntryBinArea((*it).Group, (*it).Elem); + LoadEntryBinArea(b); + b->SetValue(GDCM_BINLOADED); continue; } @@ -693,12 +695,18 @@ void Document::LoadEntryBinArea(uint16_t group, uint16_t elem) // Search the corresponding DocEntry DocEntry *docElement = GetDocEntry(group, elem); if ( !docElement ) + { + gdcmWarningMacro(std::hex << group << "|" << elem + << "doesn't exist" ); return; - + } BinEntry *binElement = dynamic_cast(docElement); if ( !binElement ) + { + gdcmWarningMacro(std::hex << group << "|" << elem + << "is NOT a BinEntry"); return; - + } LoadEntryBinArea(binElement); } @@ -1325,8 +1333,6 @@ return newEntry; * \brief Loads (or not) the element content depending if its length exceeds * or not the value specified with Document::SetMaxSizeLoadEntry() * @param entry Header Entry (Dicom Element) to be dealt with - * @param forceLoad wheter we want to load its content even if its length - * exceeds the value specified with Document::SetMaxSizeLoadEntry() */ void Document::LoadDocEntry(DocEntry *entry, bool forceLoad) { diff --git a/src/gdcmPixelReadConvert.cxx b/src/gdcmPixelReadConvert.cxx index ba2b53f9..3e4a1e34 100644 --- a/src/gdcmPixelReadConvert.cxx +++ b/src/gdcmPixelReadConvert.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmPixelReadConvert.cxx,v $ Language: C++ - Date: $Date: 2005/08/19 13:15:05 $ - Version: $Revision: 1.76 $ + Date: $Date: 2005/09/07 14:12:23 $ + Version: $Revision: 1.77 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -950,15 +950,7 @@ bool PixelReadConvert::ConvertReArrangeBits() throw ( FormatError ) // nmask : to propagate sign bit on negative values int16_t nmask = (int16_t)0x8000; nmask = nmask >> ( BitsAllocated - BitsStored - 1 ); -/* -std::cout << "BitsStored " << BitsStored - << " BitsAllocated " << BitsAllocated - << std::endl; -std::cout << std::hex << "pmask " << pmask - << " smask " << smask - << " nmask " << nmask - << std::endl; -*/ + for(int i = 0; i> (BitsStored - HighBitPosition - 1); diff --git a/src/gdcmVR.cxx b/src/gdcmVR.cxx index 5cac6be3..57b93016 100644 --- a/src/gdcmVR.cxx +++ b/src/gdcmVR.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmVR.cxx,v $ Language: C++ - Date: $Date: 2005/09/07 10:39:45 $ - Version: $Revision: 1.39 $ + Date: $Date: 2005/09/07 14:12:23 $ + Version: $Revision: 1.40 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -141,6 +141,7 @@ bool VR::IsVROfStringRepresentable(VRKey const &tested) tested != "FD" && tested != "OB" && tested != "OW" && + tested != "AT" && // Attribute Tag ?!? tested != "SQ" ; */ }