]> Creatis software - gdcm.git/commitdiff
Comments
authorjpr <jpr>
Thu, 3 Nov 2005 14:21:50 +0000 (14:21 +0000)
committerjpr <jpr>
Thu, 3 Nov 2005 14:21:50 +0000 (14:21 +0000)
src/gdcmDocument.cxx
src/gdcmFile.cxx

index 2bf79ead5b000e767932fba248527d599996b0ea..377d95a988fa9afaf46e4c638fbd4481b89ff126 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDocument.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/10/28 15:52:46 $
-  Version:   $Revision: 1.320 $
+  Date:      $Date: 2005/11/03 14:21:50 $
+  Version:   $Revision: 1.321 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -939,7 +939,7 @@ void Document::SkipBytes(uint32_t nBytes)
 }
 
 /**
- * \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( ) 
 {
@@ -963,11 +963,6 @@ 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" ) 
@@ -975,7 +970,7 @@ int Document::ComputeGroup0002Length( )
                   // explicit VR AND (OB, OW, SQ, UT) : 4 more bytes
                   groupLength +=  4;
                }
-            //}
             groupLength += 2 + 2 + 4 + entry->GetLength();   
          }
       }
index 1ad8c6a70c92dac89ba334c59bab418f62e7464b..c8e0d9029a52d392d17de88395fbe562831634b1 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmFile.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/11/02 10:15:04 $
-  Version:   $Revision: 1.299 $
+  Date:      $Date: 2005/11/03 14:23:13 $
+  Version:   $Revision: 1.300 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -1471,19 +1471,18 @@ bool File::Write(std::string fileName, FileType writetype)
       e0000->SetString(sLen.str());
    }
 
-   // Derma?.dcm does not have it...let's remove it  FIXME FIXME
+   // FIXME : Derma?.dcm does not have it...let's remove it ?!? JPRx
    if( writetype != JPEG )
    {
-     int i_lgPix = GetEntryLength(GrPixel, NumPixel);
-     if (i_lgPix != -2)
-     {
-       // no (GrPixel, NumPixel) element
-       std::string s_lgPix = Util::Format("%d", i_lgPix+12);
-       s_lgPix = Util::DicomString( s_lgPix.c_str() );
-       InsertEntryString(s_lgPix,GrPixel, 0x0000);
-       }
-     }
-
+      int i_lgPix = GetEntryLength(GrPixel, NumPixel);
+      if (i_lgPix != -2)
+      {
+         // no (GrPixel, NumPixel) element
+         std::string s_lgPix = Util::Format("%d", i_lgPix+12);
+         s_lgPix = Util::DicomString( s_lgPix.c_str() );
+         InsertEntryString(s_lgPix,GrPixel, 0x0000);   
+      }
+   }
    Document::WriteContent(fp, writetype);
 
    fp->close();