]> Creatis software - gdcm.git/commitdiff
Cosmetics for making ProntFile more clear when forceLoad was asked
authorjpr <jpr>
Wed, 7 Sep 2005 14:12:23 +0000 (14:12 +0000)
committerjpr <jpr>
Wed, 7 Sep 2005 14:12:23 +0000 (14:12 +0000)
src/gdcmBinEntry.cxx
src/gdcmDocEntry.cxx
src/gdcmDocument.cxx
src/gdcmPixelReadConvert.cxx
src/gdcmVR.cxx

index 3e150aaa6326f89ff05803af19ca2cd87f59c402..eb38569e6b94485ead196cf5de106b1e184b2410 100644 (file)
@@ -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() << "]";
          } 
       }
    }
index 526925449d0001bef59e10ce2a38a0acf214413e..a584ae8605859e01729196eaed84c00dcc8f8054 100644 (file)
@@ -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
       {
index 553f2a872982271ac8f0351abbc52b7fcd9b9074..a4f702f6e98ee38f03bf9084917edbfede6dcd56 100644 (file)
@@ -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<BinEntry *>(d) )
+      BinEntry *b = dynamic_cast<BinEntry *>(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<BinEntry *>(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)
 {
index ba2b53f9d0d853e22487ec24ac5ecd41594de2ef..3e4a1e346c8b0db4cc26618b18ec9bc0e4759363 100644 (file)
@@ -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<l; i++)
             {
                *deb = *deb >> (BitsStored - HighBitPosition - 1);
index 5cac6be39821e3d28e6d4957e8324259e98b138e..57b9301614d4d17d3c013eb8665406f0c4d812de 100644 (file)
@@ -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" ;
 */
 }