]> Creatis software - gdcm.git/blobdiff - src/gdcmFile.cxx
Remove now useless warning/comments
[gdcm.git] / src / gdcmFile.cxx
index d83dd3f50e4c3aed3f35fcaced7d045fae811ea9..593a0998dddb740408e43b48807ec1b358e7aefa 100644 (file)
@@ -1,10 +1,10 @@
-  /*=========================================================================
+/*=========================================================================
                                                                                 
   Program:   gdcm
   Module:    $RCSfile: gdcmFile.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/11 00:21:48 $
-  Version:   $Revision: 1.188 $
+  Date:      $Date: 2005/01/16 04:50:42 $
+  Version:   $Revision: 1.193 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -17,6 +17,8 @@
 =========================================================================*/
 
 #include "gdcmFile.h"
+#include "gdcmGlobal.h"
+#include "gdcmTS.h"
 #include "gdcmDocument.h"
 #include "gdcmDebug.h"
 #include "gdcmUtil.h"
@@ -125,7 +127,7 @@ File::~File()
 
 //-----------------------------------------------------------------------------
 // Print
-void File::Print(std::ostream &os)
+void File::Print(std::ostream &os, std::string const &)
 {
    HeaderInternal->SetPrintLevel(PrintLevel);
    HeaderInternal->Print(os);
@@ -138,9 +140,10 @@ void File::Print(std::ostream &os)
 // Public
 /**
  * \brief   Get the size of the image data
- * 
  *          If the image can be RGB (with a lut or by default), the size 
  *          corresponds to the RGB image
+ *         (use GetImageDataRawSize if you want to be sure to get *only*
+ *          the size of the pixels)
  * @return  The image size
  */
 size_t File::GetImageDataSize()
@@ -155,9 +158,9 @@ size_t File::GetImageDataSize()
 
 /**
  * \brief   Get the size of the image data
- * 
- *          If the image can be RGB by transformation in a LUT, this
- *          transformation isn't considered
+ *          If the image could be converted to RGB using a LUT, 
+ *          this transformation is not taken into account by GetImageDataRawSize
+ *          (use GetImageDataSize if you wish)
  * @return  The raw image size
  */
 size_t File::GetImageDataRawSize()
@@ -528,12 +531,12 @@ bool File::Write(std::string const &fileName)
  *          the given value.
  * @param   content new value (string) to substitute with
  * @param   group     group number of the Dicom Element to modify
- * @param   element element number of the Dicom Element to modify
+ * @param   elem element number of the Dicom Element to modify
  */
 bool File::SetEntry(std::string const &content,
-                    uint16_t group, uint16_t element)
+                    uint16_t group, uint16_t elem)
 { 
-   return HeaderInternal->SetEntry(content,group,element);
+   return HeaderInternal->SetEntry(content,group,elem);
 }
 
 
@@ -544,12 +547,12 @@ bool File::SetEntry(std::string const &content,
  * @param   content new value (void*  -> uint8_t*) to substitute with
  * @param   lgth new value length
  * @param   group     group number of the Dicom Element to modify
- * @param   element element number of the Dicom Element to modify
+ * @param   elem element number of the Dicom Element to modify
  */
 bool File::SetEntry(uint8_t *content, int lgth,
-                    uint16_t group, uint16_t element)
+                    uint16_t group, uint16_t elem)
 {
-   return HeaderInternal->SetEntry(content,lgth,group,element);
+   return HeaderInternal->SetEntry(content,lgth,group,elem);
 }
 
 /**
@@ -557,14 +560,14 @@ bool File::SetEntry(uint8_t *content, int lgth,
  *          when it exists. Create it with the given value when unexistant.
  * @param   content (string) Value to be set
  * @param   group   Group number of the Entry 
- * @param   element  Element number of the Entry
+ * @param   elem  Element number of the Entry
  * \return  pointer to the modified/created Header Entry (NULL when creation
  *          failed).
  */ 
 bool File::ReplaceOrCreate(std::string const &content,
-                           uint16_t group, uint16_t element)
+                           uint16_t group, uint16_t elem)
 {
-   return HeaderInternal->ReplaceOrCreate(content,group,element) != NULL;
+   return HeaderInternal->ReplaceOrCreate(content,group,elem) != NULL;
 }
 
 /*
@@ -573,14 +576,14 @@ bool File::ReplaceOrCreate(std::string const &content,
  *          A copy of the binArea is made to be kept in the Document.
  * @param   binArea (binary) value to be set
  * @param   group   Group number of the Entry 
- * @param   element  Element number of the Entry
+ * @param   elem  Element number of the Entry
  * \return  pointer to the modified/created Header Entry (NULL when creation
  *          failed).
  */
 bool File::ReplaceOrCreate(uint8_t *binArea, int lgth,
-                           uint16_t group, uint16_t element)
+                           uint16_t group, uint16_t elem)
 {
-   return HeaderInternal->ReplaceOrCreate(binArea,lgth,group,element) != NULL;
+   return HeaderInternal->ReplaceOrCreate(binArea,lgth,group,elem) != NULL;
 }
 
 /**
@@ -777,7 +780,7 @@ void File::SetWriteFileTypeToACR()
 void File::SetWriteFileTypeToExplicitVR()
 {
    std::string ts = Util::DicomString( 
-      Document::GetTransferSyntaxValue(ExplicitVRLittleEndian).c_str() );
+      Global::GetTS()->GetSpecialTransferSyntax(TS::ExplicitVRLittleEndian) );
 
    ValEntry *tss = CopyValEntry(0x0002,0x0010);
    tss->SetValue(ts);
@@ -788,7 +791,7 @@ void File::SetWriteFileTypeToExplicitVR()
 void File::SetWriteFileTypeToImplicitVR()
 {
    std::string ts = Util::DicomString(
-      Document::GetTransferSyntaxValue(ImplicitVRLittleEndian).c_str() );
+      Global::GetTS()->GetSpecialTransferSyntax(TS::ImplicitVRLittleEndian) );
 
    ValEntry *tss = CopyValEntry(0x0002,0x0010);
    tss->SetValue(ts);
@@ -852,9 +855,9 @@ void File::RestoreWriteOfLibido()
    Archive->Restore(0x0008,0x0010);
 }
 
-ValEntry *File::CopyValEntry(uint16_t group,uint16_t element)
+ValEntry *File::CopyValEntry(uint16_t group,uint16_t elem)
 {
-   DocEntry *oldE = HeaderInternal->GetDocEntry(group, element);
+   DocEntry *oldE = HeaderInternal->GetDocEntry(group, elem);
    ValEntry *newE;
 
    if(oldE)
@@ -864,15 +867,15 @@ ValEntry *File::CopyValEntry(uint16_t group,uint16_t element)
    }
    else
    {
-      newE = GetHeader()->NewValEntry(group,element);
+      newE = GetHeader()->NewValEntry(group,elem);
    }
 
    return newE;
 }
 
-BinEntry *File::CopyBinEntry(uint16_t group,uint16_t element)
+BinEntry *File::CopyBinEntry(uint16_t group,uint16_t elem)
 {
-   DocEntry *oldE = HeaderInternal->GetDocEntry(group, element);
+   DocEntry *oldE = HeaderInternal->GetDocEntry(group, elem);
    BinEntry *newE;
 
    if(oldE)
@@ -882,7 +885,7 @@ BinEntry *File::CopyBinEntry(uint16_t group,uint16_t element)
    }
    else
    {
-      newE = GetHeader()->NewBinEntry(group,element);
+      newE = GetHeader()->NewBinEntry(group,elem);
    }
 
    return newE;