]> Creatis software - gdcm.git/blobdiff - src/gdcmSerieHelper.cxx
* Fix the unix installation for the python part
[gdcm.git] / src / gdcmSerieHelper.cxx
index 984298943cdbe53344797d776563e58c7ee02fae..47b2b57c7543109f331b92cd5cf53caf7de92c4e 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmSerieHelper.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/10/17 15:05:44 $
-  Version:   $Revision: 1.22 $
+  Date:      $Date: 2005/10/21 08:49:36 $
+  Version:   $Revision: 1.26 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -106,7 +106,7 @@ void SerieHelper::AddFileName(std::string const &filename)
           ++it2)
       {
          const ExRule &r = *it2;
-         s = header->GetEntryValue( r.group, r.elem );
+         s = header->GetEntryString( r.group, r.elem );
          if ( !Util::CompareDicomString(s, r.value.c_str(), r.op) )
          {
            // Argh ! This rule is unmatched; let's just quit
@@ -121,7 +121,7 @@ void SerieHelper::AddFileName(std::string const &filename)
          // Let's add it!
 
          // 0020 000e UI REL Series Instance UID
-         const std::string &uid = header->GetEntryValue (0x0020, 0x000e);
+         const std::string &uid = header->GetEntryString(0x0020, 0x000e);
          // if uid == GDCM_UNFOUND then consistently we should find GDCM_UNFOUND
          // no need here to do anything special
 
@@ -152,7 +152,7 @@ void SerieHelper::AddFileName(std::string const &filename)
  *        of the gdcm::SerieHelper.
  * \warning : this method should be used by aware users only!
  *           Passing a gdcm::File* has the same effect than passing a file name!
- * \TODO : decide which one is wrong (the method, or the commentary)!
+ * \todo : decide which one is wrong (the method, or the commentary)!
  *           the following comment doesn't match the method :-(
  *            User is supposed to know the files he want to deal with
  *           and consider them they belong to the same Serie
@@ -327,7 +327,7 @@ bool SerieHelper::IsCoherent(FileList *fileSet)
 }
 
 #ifndef GDCM_LEGACY_REMOVE
-/**
+/* *
  * \brief   accessor (DEPRECATED :  use GetFirstSingleSerieUIDFileSet )
  *          Warning : 'coherent' means here they have the same Serie UID
  * @return  The first FileList if found, otherwhise NULL
@@ -340,7 +340,7 @@ FileList *SerieHelper::GetFirstCoherentFileList()
    return NULL;
 }
 
-/**
+/* *
  * \brief   accessor (DEPRECATED :  use GetNextSingleSerieUIDFileSet )
  *          Warning : 'coherent' means here they have the same Serie UID
  * \note : meaningfull only if GetFirstCoherentFileList() already called 
@@ -356,7 +356,7 @@ FileList *SerieHelper::GetNextCoherentFileList()
    return NULL;
 }
 
-/**
+/* *
  * \brief   accessor (DEPRECATED :  use GetSingleSerieUIDFileSet )
   *          Warning : 'coherent' means here they have the same Serie UID
  * @param SerieUID SerieUID
@@ -486,11 +486,11 @@ XCoherentFileSetmap SerieHelper::SplitOnPosition(FileList *fileSet)
       // 0020,0032 : Image Position Patient
       // 0020,0030 : Image Position (RET)
 
-      std::string strImPos = (*it)->GetEntryValue(0x0020,0x0032);
+      strImPos = (*it)->GetEntryString(0x0020,0x0032);
       if ( strImPos == GDCM_UNFOUND)
       {
          gdcmWarningMacro( "Unfound Image Position Patient (0020,0032)");
-         strImPos = (*it)->GetEntryValue(0x0020,0x0030); // For ACR-NEMA images
+         strImPos = (*it)->GetEntryString(0x0020,0x0030); // For ACR-NEMA images
          if ( strImPos == GDCM_UNFOUND )
          {
             gdcmWarningMacro( "Unfound Image Position (RET) (0020,0030)");
@@ -535,11 +535,13 @@ XCoherentFileSetmap SerieHelper::SplitOnPosition(FileList *fileSet)
  * \brief   Splits a SingleSerieUID File set Coherent according to the
  *          value of a given Tag
  * @param fileSet File Set to be splitted
+ * @param   group  group number of the target Element
+ * @param   elem element number of the target Element
  * \return  std::map of 'Xcoherent' File sets
  */
 
 XCoherentFileSetmap SerieHelper::SplitOnTagValue(FileList *fileSet, 
-                                               uint16_t group, uint16_t element)
+                                               uint16_t group, uint16_t elem)
 {
    XCoherentFileSetmap CoherentFileSet;
 
@@ -559,7 +561,7 @@ XCoherentFileSetmap SerieHelper::SplitOnTagValue(FileList *fileSet,
       // 0020,0032 : Image Position Patient
       // 0020,0030 : Image Position (RET)
 
-      std::string strTagValue = (*it)->GetEntryValue(group,element);
+      strTagValue = (*it)->GetEntryString(group,elem);
       
       if ( CoherentFileSet.count(strTagValue) == 0 )
       {
@@ -569,7 +571,7 @@ XCoherentFileSetmap SerieHelper::SplitOnTagValue(FileList *fileSet,
       }
       // Current Tag value and DICOM header match; add the file:
       CoherentFileSet[strTagValue]->push_back( (*it) );
-   }   
+   }
    return CoherentFileSet;
 }