]> Creatis software - gdcm.git/blobdiff - src/gdcmDocEntry.cxx
ENH: Adding jpeg error handling. As quoted we could be more fancy and throw an except...
[gdcm.git] / src / gdcmDocEntry.cxx
index d90383c0822c693e498073f278bb4a4969f5f22c..474d5681305e2ad956335c115cab6ca3f6da9c45 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDocEntry.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/02/01 10:29:55 $
-  Version:   $Revision: 1.50 $
+  Date:      $Date: 2005/02/02 16:18:48 $
+  Version:   $Revision: 1.52 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -60,7 +60,7 @@ void DocEntry::WriteContent(std::ofstream *fp, FileType filetype)
 {
    uint32_t ffff  = 0xffffffff;
    uint16_t group = GetGroup();
-   VRKey vr   = GetVR();
+   VRKey vr       = GetVR();
    uint16_t el    = GetElement();
    uint32_t lgr   = GetLength();
 
@@ -74,8 +74,8 @@ void DocEntry::WriteContent(std::ofstream *fp, FileType filetype)
    //
    // ----------- Writes the common part
    //
-   binary_write( *fp, group); //group
-   binary_write( *fp, el);    //element
+   binary_write( *fp, group); //group number
+   binary_write( *fp, el);    //element number
 
    if ( filetype == ExplicitVR )
    {
@@ -168,18 +168,6 @@ uint32_t DocEntry::GetFullLength()
    return l;
 }
 
-/**
- * \brief   Copies all the attributes from an other DocEntry 
- * @param doc entry to copy from
- */
-void DocEntry::Copy(DocEntry *doc)
-{
-   Length     = doc->Length;
-   ReadLength = doc->ReadLength;
-   ImplicitVR = doc->ImplicitVR;
-   Offset     = doc->Offset;
-}
-
 /**
  * \brief   tells us if entry is the last one of a 'no length' SequenceItem 
  *          (fffe,e00d) 
@@ -198,6 +186,18 @@ bool DocEntry::IsSequenceDelimitor()
    return (GetGroup() == 0xfffe && GetElement() == 0xe0dd);
 }
 
+/**
+ * \brief   Copies all the attributes from an other DocEntry 
+ * @param doc entry to copy from
+ */
+void DocEntry::Copy(DocEntry *doc)
+{
+   Length     = doc->Length;
+   ReadLength = doc->ReadLength;
+   ImplicitVR = doc->ImplicitVR;
+   Offset     = doc->Offset;
+}
+
 //-----------------------------------------------------------------------------
 // Protected