Maverick/Reporting progress: Difference between revisions

From KitwarePublic
Jump to navigationJump to search
(New page: For internal modules, we use vtkEvents to report progress. For external modules (written as ITK applications using generateCLP), we use the Slicer event reporting mechanism. We've creat...)
 
(Redirected page to Maverick)
 
Line 1: Line 1:
For internal modules, we use vtkEvents to report progress.
#REDIRECT [[Maverick]]
 
For external modules (written as ITK applications using generateCLP), we use the Slicer event reporting mechanism.  We've created convenience functions to simplify this process. 
# Slicer already provided method for monitoring ITK filters.  We've redistributed that code (and made minor modifications) in Code/Common/itkPluginFilterWatcher.h
# We created our own class for progress reporting during modules during periods of computation not allocated to ITK Filters.  That code is in Code/Common/mavPluginProgressReporter.h
 
Both methods work when the external module is loaded as a DLL or as an exec.
 
== itkPluginFilterWatcher ==
 
* Modified version of the function of the same name that is distributed with Slicer.
 
== mavPluginProgressReporter ==
 
* New class that simplifies progress reporting outside of itk filters.
* Simple example is in Maverick/Modules/Resample.cxx
* Code snippit is given below:
 
#include "mavPluginProgressReporter.h"
int main( int argc, char ** argv )
  {
  ...Magic happens here...
  // By using GenerateCLP, a variable "CLPProcessInformation" is created.  This variable
  //  is key to progress reporting from an external module to a Maverick application
  mav::PluginProgressReporter reporter( "Resample", CLPProcessInformation );
  reporter.Start();
  ... do some stuff ...
  reporter.Report( 0.1 );
  ... do more stuff ...
  reporter.Report( 0.9 );
  ...
  reporter.End();
  }

Latest revision as of 21:02, 20 March 2012

Redirect to: