]> Creatis software - gdcm.git/blobdiff - src/gdcmFileHelper.cxx
Fix some comments
[gdcm.git] / src / gdcmFileHelper.cxx
index fd18f2719ed1929120de599afb9407f35528b148..583a619297edf04e7c93673f42596f9ae82416d3 100644 (file)
@@ -4,8 +4,8 @@
   Module:    $RCSfile: gdcmFileHelper.cxx,v $
   Language:  C++
 
-  Date:      $Date: 2005/03/22 11:40:13 $
-  Version:   $Revision: 1.31 $
+  Date:      $Date: 2005/04/19 12:31:56 $
+  Version:   $Revision: 1.34 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -611,6 +611,7 @@ bool FileHelper::Write(std::string const &fileName)
          SetWriteFileTypeToImplicitVR();
          CheckMandatoryElements();
          break;
+      case Unknown:  // should never happen; ExplicitVR is the default value
       case ExplicitVR:
          SetWriteFileTypeToExplicitVR();
          CheckMandatoryElements();
@@ -625,10 +626,10 @@ bool FileHelper::Write(std::string const &fileName)
         if ( ! FileInternal->GetValEntry(0x0008, 0x0010) )
             FileInternal->InsertValEntry("", 0x0008, 0x0010);
          SetWriteFileTypeToACR();
-         break;
-      default:
-         SetWriteFileTypeToExplicitVR();
+         SetWriteFileTypeToImplicitVR();
          CheckMandatoryElements();
+         break;
+
    }
 
    // --------------------------------------------------------------
@@ -639,13 +640,7 @@ bool FileHelper::Write(std::string const &fileName)
    // just before writting ...
    /// \todo the best trick would be *change* the recognition code
    ///       but pb expected if user deals with, e.g. COMPLEX images
-   if( WriteType == ACR_LIBIDO )
-   //
-   // if recognition code tells us we dealt with a LibIDO image
-   // we reproduce on disk the switch between lineNumber and columnNumber
-   // just before writting ...
-   /// \todo the best trick would be *change* the recognition code
-   ///       but pb expected if user deals with, e.g. COMPLEX images
+   
    if( WriteType == ACR_LIBIDO )
    {
       SetWriteToLibido();
@@ -1135,6 +1130,7 @@ void FileHelper::CheckMandatoryElements()
       e_0002_0001->SetLength(2);
       Archive->Push(e_0002_0001);
 
+   // 'Media Stored SOP Class UID' 
    ValEntry *e_0002_0002 = CopyValEntry(0x0002,0x0002);
       // [Secondary Capture Image Storage]
       e_0002_0002->SetValue("1.2.840.10008.5.1.4.1.1.7"); 
@@ -1393,7 +1389,10 @@ void FileHelper::Initialize()
 }
 
 /**
- * \brief   
+ * \brief Reads/[decompresses] the pixels, 
+ *        *without* making RGB from Palette Colors 
+ * @return the pixels area, whatever its type 
+ *         (uint8_t is just for prototyping : feel free to Cast it) 
  */ 
 uint8_t *FileHelper::GetRaw()
 {
@@ -1418,7 +1417,11 @@ uint8_t *FileHelper::GetRaw()
 }
 
 //-----------------------------------------------------------------------------
-// Print
+/**
+ * \brief   Prints the common part of ValEntry, BinEntry, SeqEntry
+ * @param   os ostream we want to print in
+ * @param indent (unused)
+ */
 void FileHelper::Print(std::ostream &os, std::string const &)
 {
    FileInternal->SetPrintLevel(PrintLevel);