From: jpr Date: Tue, 30 May 2006 08:10:19 +0000 (+0000) Subject: Comment out some deprecated function (instead of GDCM_LEGACY, that seems to be X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=01f14ba7d0d9eee2b8f0a768efd116e26023be12;p=gdcm.git Comment out some deprecated function (instead of GDCM_LEGACY, that seems to be dealt with in a mood-dependant way by swig), to be able to compile everywhere. --- diff --git a/src/gdcmDicomDir.cxx b/src/gdcmDicomDir.cxx index 4949504a..6c42fea2 100644 --- a/src/gdcmDicomDir.cxx +++ b/src/gdcmDicomDir.cxx @@ -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) diff --git a/src/gdcmDicomDir.h b/src/gdcmDicomDir.h index 79baf24b..a402e279 100644 --- a/src/gdcmDicomDir.h +++ b/src/gdcmDicomDir.h @@ -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); diff --git a/src/gdcmDocument.cxx b/src/gdcmDocument.cxx index 9ddb8a57..c339fa44 100644 --- a/src/gdcmDocument.cxx +++ b/src/gdcmDocument.cxx @@ -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<GetKey()<<" "<GetVR()<GetKey()<<" "<GetVR()<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 diff --git a/src/gdcmDocument.h b/src/gdcmDocument.h index 841bd685..28996c28 100644 --- a/src/gdcmDocument.h +++ b/src/gdcmDocument.h @@ -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 diff --git a/src/gdcmSerieHelper.cxx b/src/gdcmSerieHelper.cxx index f06d256f..d16d5263 100644 --- a/src/gdcmSerieHelper.cxx +++ b/src/gdcmSerieHelper.cxx @@ -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 diff --git a/src/gdcmSerieHelper.h b/src/gdcmSerieHelper.h index ca6f727e..14a13df0 100644 --- a/src/gdcmSerieHelper.h +++ b/src/gdcmSerieHelper.h @@ -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();