]> Creatis software - gdcm.git/commitdiff
Comment out some deprecated function (instead of GDCM_LEGACY, that seems to be
authorjpr <jpr>
Tue, 30 May 2006 08:10:19 +0000 (08:10 +0000)
committerjpr <jpr>
Tue, 30 May 2006 08:10:19 +0000 (08:10 +0000)
dealt with in a mood-dependant way by swig), to be able to compile everywhere.

src/gdcmDicomDir.cxx
src/gdcmDicomDir.h
src/gdcmDocument.cxx
src/gdcmDocument.h
src/gdcmSerieHelper.cxx
src/gdcmSerieHelper.h

index 4949504a1bfcfab68a2bc5fae0e9cf8642a4ef98..6c42fea238370cea60848fd12c63a526b885273d 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDicomDir.cxx,v $
   Language:  C++
-  Date:      $Date: 2006/04/13 08:05:52 $
-  Version:   $Revision: 1.188 $
+  Date:      $Date: 2006/05/30 08:10:19 $
+  Version:   $Revision: 1.189 $
   
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -129,7 +129,7 @@ DicomDir::DicomDir()
    NewMeta();
 }
 
-#ifndef GDCM_LEGACY_REMOVE
+//#ifndef GDCM_LEGACY_REMOVE
 /**
  * \brief Constructor Parses recursively the directory and creates the DicomDir
  *        or uses an already built DICOMDIR, depending on 'parseDir' value.
@@ -144,6 +144,7 @@ DicomDir::DicomDir()
  * @deprecated use : new DicomDir() + [ SetLoadMode(lm) + ] SetDirectoryName(name)
  *              or : new DicomDir() + SetFileName(name)
  */
+ /*
 DicomDir::DicomDir(std::string const &fileName, bool parseDir ):
    Document( )
 {
@@ -157,7 +158,8 @@ DicomDir::DicomDir(std::string const &fileName, bool parseDir ):
    SetFileName( fileName );
    Load( );
 }
-#endif
+*/
+//#endif
 
 /**
  * \brief  Canonical destructor 
@@ -189,7 +191,7 @@ bool DicomDir::Load( )
    }
    return DoTheLoadingJob( );   
 }
-#ifndef GDCM_LEGACY_REMOVE
+//#ifndef GDCM_LEGACY_REMOVE
 /**
  * \brief   Loader. (DEPRECATED : kept not to break the API)
  * @param   fileName file to be open for parsing
@@ -197,6 +199,7 @@ bool DicomDir::Load( )
  *         or no tag was found.
  * @deprecated use SetFileName(n) + Load() instead
  */
+ /*
 bool DicomDir::Load(std::string const &fileName ) 
 {
    // We should clean out anything that already exists.
@@ -210,7 +213,8 @@ bool DicomDir::Load(std::string const &fileName )
    }
    return DoTheLoadingJob( );
 }
-#endif
+*/
+//#endif
 
 /**
  * \brief   Does the Loading Job (internal use only)
index 79baf24ba0eba79d0ee056d4dd631f521f5a9e69..a402e279b3fd028ef932564b30927185ce4215a9 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDicomDir.h,v $
   Language:  C++
-  Date:      $Date: 2006/05/22 14:09:45 $
-  Version:   $Revision: 1.76 $
+  Date:      $Date: 2006/05/30 08:10:19 $
+  Version:   $Revision: 1.77 $
   
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -56,7 +56,7 @@ public:
 /// \brief Constructs a DicomDir with a RefCounter
    static DicomDir *New() {return new DicomDir();}
 
-   GDCM_LEGACY( bool Load(std::string const &filename) )
+//   GDCM_LEGACY( bool Load(std::string const &filename) )
    bool Load( );
    void Print(std::ostream &os = std::cout, std::string const &indent = "" );
 
@@ -116,7 +116,7 @@ public:
 protected:
    DicomDir();
    ~DicomDir();
-   GDCM_LEGACY( DicomDir(std::string const &filename, bool parseDir = false) )
+//   GDCM_LEGACY( DicomDir(std::string const &filename, bool parseDir = false) )
 
    void CreateDicomDirChainedList(std::string const &path);
 
index 9ddb8a5739dd14ead91f8e00ad0fb713da913f23..c339fa44ff53f8a59dbe98c6d4cdd58a91b9a175 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDocument.cxx,v $
   Language:  C++
-  Date:      $Date: 2006/05/12 09:37:45 $
-  Version:   $Revision: 1.348 $
+  Date:      $Date: 2006/05/30 08:10:19 $
+  Version:   $Revision: 1.349 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -95,19 +95,22 @@ bool Document::Load(  )
    return DoTheLoadingDocumentJob( );
 }
 
-#ifndef GDCM_LEGACY_REMOVE
+
+//#ifndef GDCM_LEGACY_REMOVE
 /**
  * \brief   Loader. (DEPRECATED : not to break the API)   
  * @param   fileName 'Document' (File or DicomDir) to be open for parsing
  * @return false if file cannot be open or no swap info was found,
  *         or no tag was found.
  */
+ /*
 bool Document::Load( std::string const &fileName ) 
 {
    Filename = fileName;
    return DoTheLoadingDocumentJob( );
 }
-#endif
+*/
+//#endif
 
 /**
  * \brief   Performs the Loading Job (internal use only)  
@@ -260,7 +263,7 @@ bool Document::DoTheLoadingDocumentJob(  )
       LoadDocEntry(d, true);
    }
 
-   CloseFile(); 
+   CloseFile();
   
    // ----------------------------
    // Specific code to allow gdcm to read ACR-LibIDO formated images
@@ -1046,7 +1049,7 @@ void Document::ParseDES(DocEntrySet *set, long offset,
    DocEntry *newDocEntry;
    DataEntry *newDataEntry;
    SeqEntry *newSeqEntry;
-   VRKey vr;
+   //VRKey vr;
    bool used; // will be set to false when something wrong happens to an Entry.
               // (Entry will then be deleted)
    bool delim_mode_intern = delim_mode;
@@ -1072,19 +1075,20 @@ void Document::ParseDES(DocEntrySet *set, long offset,
          {
             break;
          }
-      newDocEntry = ReadNextDocEntry( );
 
-      // Uncoment this cerr line to be able to 'follow' the DocEntries
-      // when something *very* strange happens
-      if( Debug::GetDebugFlag() ) 
-         std::cerr<<newDocEntry->GetKey()<<" "<<newDocEntry->GetVR()<<std::endl;
+      newDocEntry = ReadNextDocEntry( );
 
       if ( !newDocEntry )
       {
          break;
       }
+      
+      // Uncoment this cerr line to be able to 'follow' the DocEntries
+      // when something *very* strange happens
+      if( Debug::GetDebugFlag() ) 
+         std::cerr<<newDocEntry->GetKey()<<" "<<newDocEntry->GetVR()<<std::endl;
 
-       // an Item Starter found elsewhere but the first position
+       // an Item Starter found elsewhere but in the first position
        // of a SeqEntry means previous entry was a Sequence
        // but we didn't get it (private Sequence + Implicit VR)
        // we have to backtrack.
@@ -1105,7 +1109,7 @@ void Document::ParseDES(DocEntrySet *set, long offset,
       {
          //////////////////////////// DataEntry
  
-         vr = newDocEntry->GetVR();
+         //vr = newDocEntry->GetVR(); // useless ?
 
          if ( !set->AddEntry( newDataEntry ) )
          {
@@ -1377,10 +1381,10 @@ DocEntry *Document::Backtrack(DocEntry *docEntry)
  */
 void Document::LoadDocEntry(DocEntry *entry, bool forceLoad)
 {
-   uint16_t group  = entry->GetGroup();
-   uint16_t elem  = entry->GetElement();
+   uint16_t group   = entry->GetGroup();
+   uint16_t elem    = entry->GetElement();
    const VRKey  &vr = entry->GetVR();
-   uint32_t length = entry->GetLength();
+   uint32_t length  = entry->GetLength();
 
  //  Fp->seekg((long)entry->GetOffset(), std::ios::beg); // JPRx
 
index 841bd685b15d8968bd0a1e9423d30054afcf551d..28996c2817506e42b261b940cc7d8e796ca54974 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDocument.h,v $
   Language:  C++
-  Date:      $Date: 2006/02/16 20:06:14 $
-  Version:   $Revision: 1.140 $
+  Date:      $Date: 2006/05/30 08:10:19 $
+  Version:   $Revision: 1.141 $
  
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -48,9 +48,9 @@ public:
 
 // Loading
    //Deprecated : use SetFileName() + Load()
-#ifndef GDCM_LEGACY_REMOVE 
-   virtual bool Load( std::string const &filename ); 
-#endif
+//#ifndef GDCM_LEGACY_REMOVE 
+//   virtual bool Load( std::string const &filename ); 
+//#endif
    virtual bool Load( ); 
 
 // Dictionaries
index f06d256f4e386382d49c01b15112dfd0c83c1039..d16d52635b5c573f5d25f34233d97f99736d9f00 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmSerieHelper.cxx,v $
   Language:  C++
-  Date:      $Date: 2006/05/23 14:16:08 $
-  Version:   $Revision: 1.52 $
+  Date:      $Date: 2006/05/30 08:10:19 $
+  Version:   $Revision: 1.53 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -163,7 +163,7 @@ bool SerieHelper::AddFile(File *header)
  
       if ( SingleSerieUIDFileSetHT.count(id) == 0 )
       {
-         gdcmDebugMacro(" New Serie UID :[" << id << "]");
+         gdcmDebugMacro(" New/gdcmSerieHelper.cxx Serie UID :[" << id << "]");
          // create a std::list in 'id' position
          SingleSerieUIDFileSetHT[id] = new FileList;
       }
@@ -209,7 +209,7 @@ void SerieHelper::AddRestriction(TagKey const &key)
   ExRefine.push_back( r );
 }
 
-#ifndef GDCM_LEGACY_REMOVE
+//#ifndef GDCM_LEGACY_REMOVE
 /**
  * \brief add a rule for restricting a DICOM file to be in the serie we are
  * trying to find. For example you can select only the DICOM files from a
@@ -223,13 +223,15 @@ void SerieHelper::AddRestriction(TagKey const &key)
  * @deprecated use : AddRestriction(TagKey const &key, 
  *                                 std::string const &value, int op);
  */
+
 void SerieHelper::AddRestriction(uint16_t group, uint16_t elem, 
                                  std::string const &value, int op)
 {
   TagKey t(group, elem);
   AddRestriction(t, value, op);
 }
-#endif
+
+//#endif
 
 /**
  * \brief add an extra  'SerieDetail' for building a 'Serie Identifier'
@@ -330,12 +332,13 @@ bool SerieHelper::IsCoherent(FileList *fileSet)
    return true;
 }
 
-#ifndef GDCM_LEGACY_REMOVE
+//#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
  */
+ /*
 FileList *SerieHelper::GetFirstCoherentFileList()
 {
    ItFileSetHt = SingleSerieUIDFileSetHT.begin();
@@ -343,13 +346,14 @@ FileList *SerieHelper::GetFirstCoherentFileList()
       return ItFileSetHt->second;
    return NULL;
 }
-
+*/
 /**
  * \brief   accessor (DEPRECATED :  use GetNextSingleSerieUIDFileSet )
  *          Warning : 'coherent' means here they have the same Serie UID
  * \note : meaningfull only if GetFirstCoherentFileList() already called 
  * @return  The next FileList if found, otherwhise NULL
  */
+ /*
 FileList *SerieHelper::GetNextCoherentFileList()
 {
    gdcmAssertMacro (ItFileSetHt != SingleSerieUIDFileSetHT.end());
@@ -359,6 +363,7 @@ FileList *SerieHelper::GetNextCoherentFileList()
       return ItFileSetHt->second;
    return NULL;
 }
+*/
 
 /**
  * \brief   accessor (DEPRECATED :  use GetSingleSerieUIDFileSet )
@@ -366,13 +371,15 @@ FileList *SerieHelper::GetNextCoherentFileList()
  * @param SerieUID SerieUID
  * \return  pointer to the FileList if found, otherwhise NULL
  */
+ /*
 FileList *SerieHelper::GetCoherentFileList(std::string SerieUID)
 {
    if ( SingleSerieUIDFileSetHT.count(SerieUID) == 0 )
       return 0;     
    return SingleSerieUIDFileSetHT[SerieUID];
 }
-#endif
+*/
+//#endif
 
 
 /**
@@ -542,7 +549,7 @@ XCoherentFileSetmap SerieHelper::SplitOnPosition(FileList *fileSet)
  *          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
+ * @param   element element number of the target Element
  * \return  std::map of 'Xcoherent' File sets
  */
 
@@ -1032,13 +1039,14 @@ void SerieHelper::Sort(FileList *fileList, bool (*pt2Func)( File *file1, File *f
  std::sort(fileList->begin(), fileList->end(), pt2Func );
 }
 
+/*
 #ifndef GDCM_LEGACY_REMOVE
 bool SerieHelper::AddGdcmFile(File* header)
 {
   return AddFile(header);
 }
 #endif
-
+*/
 
 //-----------------------------------------------------------------------------
 } // end namespace gdcm
index ca6f727ee7fdd6f4b8a528b201a49380fda535d3..14a13df08b32f25de4aa235eb0b8aab74de61d9f 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmSerieHelper.h,v $
   Language:  C++
-  Date:      $Date: 2006/05/23 14:16:08 $
-  Version:   $Revision: 1.40 $
+  Date:      $Date: 2006/05/30 08:10:19 $
+  Version:   $Revision: 1.41 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -79,7 +79,7 @@ public:
    /// \todo should return bool or throw error ?
    void AddFileName(std::string const &filename);
    bool AddFile(File *header);
-   GDCM_LEGACY(bool AddGdcmFile(File* header))
//  GDCM_LEGACY(bool AddGdcmFile(File* header))
 
    void SetDirectory(std::string const &dir, bool recursive=false);
    bool IsCoherent(FileList *fileSet);
@@ -93,9 +93,9 @@ public:
    const FileList &GetFileList()
                            { return *SingleSerieUIDFileSetHT.begin()->second; }
   
-   GDCM_LEGACY(   FileList *GetFirstCoherentFileList()  )
-   GDCM_LEGACY(   FileList *GetNextCoherentFileList()   )
-   GDCM_LEGACY(   FileList *GetCoherentFileList(std::string serieUID)  )
//  GDCM_LEGACY(   FileList *GetFirstCoherentFileList()  )
//  GDCM_LEGACY(   FileList *GetNextCoherentFileList()   )
//  GDCM_LEGACY(   FileList *GetCoherentFileList(std::string serieUID)  )
 
    FileList *GetFirstSingleSerieUIDFileSet();
    FileList *GetNextSingleSerieUIDFileSet();