]> Creatis software - gdcm.git/commitdiff
FileHelper has CallProgressMethod and others
authorjpr <jpr>
Wed, 30 Nov 2005 13:42:17 +0000 (13:42 +0000)
committerjpr <jpr>
Wed, 30 Nov 2005 13:42:17 +0000 (13:42 +0000)
(works only on uncompressed files)

gdcmPython/gdcm.i
src/gdcmFileHelper.cxx
src/gdcmFileHelper.h

index 9704d6be2c37bcedef4cbcea73d659b51df52e37..5f580997f7c5e8cd74742ed2609908460c30606e 100644 (file)
@@ -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"
index c44839ede63fad2fd032506a68d3eb7c7f13e641..56df8eb75ca49654b5824901e7e0e491154378e8 100644 (file)
@@ -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
 /**
index 62bacd2b450cbcfdaec83455232537cb02ec38de..0bfd57ecb1a5160720707c2607ad1071b2207daa 100644 (file)
@@ -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;