From: jpr Date: Wed, 30 Nov 2005 13:42:17 +0000 (+0000) Subject: FileHelper has CallProgressMethod and others X-Git-Tag: Version1.3~2 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=25a0000db08f39e6702b07f9936686efebf5277f;p=gdcm.git FileHelper has CallProgressMethod and others (works only on uncompressed files) --- diff --git a/gdcmPython/gdcm.i b/gdcmPython/gdcm.i index 9704d6be..5f580997 100644 --- a/gdcmPython/gdcm.i +++ b/gdcmPython/gdcm.i @@ -13,7 +13,6 @@ #include "gdcmTagKey.h" #include "gdcmVRKey.h" #include "gdcmDict.h" -#include "gdcmDicomEntry.h" #include "gdcmDictEntry.h" #include "gdcmDictSet.h" #include "gdcmDicomDir.h" @@ -150,14 +149,6 @@ typedef unsigned long long uint64_t; %ignore gdcm::TagKey::operator[](const unsigned int &_id) const; %ignore gdcm::TagKey::operator[](const unsigned int &_id); -%ignore gdcm::DicomDir::SetStartMethod(DicomDir::Method *method,void *arg = NULL); -%ignore gdcm::DicomDir::SetProgressMethod(DicomDir::Method *method,void *arg = NULL); -%ignore gdcm::DicomDir::SetEndMethod(DicomDir::Method *method,void *arg = NULL); - -%ignore gdcm::FileHelper::SetStartMethod(FileHelper::Method *method,void *arg = NULL); -%ignore gdcm::FileHelper::SetProgressMethod(FileHelper::Method *method,void *arg = NULL); -%ignore gdcm::FileHelper::SetEndMethod(FileHelper::Method *method,void *arg = NULL); - // Ignore all placed in gdcmCommon.h %ignore GDCM_UNKNOWN; %ignore GDCM_UNFOUND; @@ -189,7 +180,6 @@ typedef unsigned long long uint64_t; %include "gdcmCommandManager.h" %include "gdcmTagKey.h" %include "gdcmVRKey.h" -%include "gdcmDicomEntry.h" %include "gdcmDictEntry.h" %include "gdcmDict.h" %include "gdcmDictSet.h" diff --git a/src/gdcmFileHelper.cxx b/src/gdcmFileHelper.cxx index c44839ed..56df8eb7 100644 --- a/src/gdcmFileHelper.cxx +++ b/src/gdcmFileHelper.cxx @@ -4,8 +4,8 @@ Module: $RCSfile: gdcmFileHelper.cxx,v $ Language: C++ - Date: $Date: 2005/11/29 17:21:35 $ - Version: $Revision: 1.84 $ + Date: $Date: 2005/11/30 13:42:19 $ + Version: $Revision: 1.85 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -1653,6 +1653,34 @@ void FileHelper::RestoreWriteMandatory() Archive->Restore(0x0020,0x000e); } + +/** + * \brief CallStartMethod + */ +void FileHelper::CallStartMethod() +{ + Progress = 0.0f; + Abort = false; + CommandManager::ExecuteCommand(this,CMD_STARTPROGRESS); +} + +/** + * \brief CallProgressMethod + */ +void FileHelper::CallProgressMethod() +{ + CommandManager::ExecuteCommand(this,CMD_PROGRESS); +} + +/** + * \brief CallEndMethod + */ +void FileHelper::CallEndMethod() +{ + Progress = 1.0f; + CommandManager::ExecuteCommand(this,CMD_ENDPROGRESS); +} + //----------------------------------------------------------------------------- // Private /** diff --git a/src/gdcmFileHelper.h b/src/gdcmFileHelper.h index 62bacd2b..0bfd57ec 100644 --- a/src/gdcmFileHelper.h +++ b/src/gdcmFileHelper.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmFileHelper.h,v $ Language: C++ - Date: $Date: 2005/11/29 17:21:35 $ - Version: $Revision: 1.36 $ + Date: $Date: 2005/11/30 13:42:19 $ + Version: $Revision: 1.37 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -194,6 +194,13 @@ private: uint8_t *GetRaw(); // members variables: +protected: + /// value of the ??? for any progress bar + float Progress; + mutable bool Abort; + +private: + /// gdcm::File to use to load the file File *FileInternal;