Skip to content
Snippets Groups Projects
Commit 86730b47 authored by Julien Malik's avatar Julien Malik
Browse files

ENH: support progress reporting from Python

parent bae20bce
No related branches found
No related tags found
No related merge requests found
......@@ -762,11 +762,25 @@ Application::IsApplicationReady()
void
Application::AddProcess(itk::ProcessObject* object, std::string description)
{
m_ProgressSource = object;
m_ProgressSourceDescription = description;
AddProcessToWatchEvent event;
event.SetProcess(object);
event.SetProcessDescription(description);
this->InvokeEvent(event);
}
itk::ProcessObject* Application::GetProgressSource() const
{
return m_ProgressSource;
}
std::string Application::GetProgressDescription() const
{
return m_ProgressSourceDescription;
}
}
}
......@@ -337,7 +337,10 @@ public:
itk::Logger* GetLogger();
void AddProcess(itk::ProcessObject* object, std::string description);
itk::ProcessObject* GetProgressSource() const;
std::string GetProgressDescription() const;
protected:
/** Constructor */
......@@ -346,6 +349,9 @@ protected:
/** Destructor */
virtual ~Application();
/* Register a ProcessObject as a new progress source */
void AddProcess(itk::ProcessObject* object, std::string description);
/** Add a new choice value to an existing choice parameter */
void AddChoice(std::string paramKey, std::string paramName);
......@@ -388,6 +394,9 @@ private:
itk::Logger::Pointer m_Logger;
itk::ProcessObject::Pointer m_ProgressSource;
std::string m_ProgressSourceDescription;
}; //end class
} // end namespace Wrapper
......
......@@ -166,6 +166,7 @@ class itkIndent {
public:
//static itkProcessObject_Pointer New();
virtual itkLightObject_Pointer CreateAnother() const;
const float& GetProgress();
private:
itkProcessObject(itkProcessObject const & arg0);
void operator=(itkProcessObject const & arg0);
......
......@@ -134,6 +134,10 @@ public:
std::string GetParameterAsString(std::string paramKey);
itkProcessObject* GetProgressSource() const;
std::string GetProgressDescription() const;
protected:
Application();
//virtual ~Application();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment