ITK
6.0.0
Insight Toolkit
|
#include <itkProgressAccumulator.h>
Facilitates progress reporting for filters that wrap around multiple other filters.
This object allows a mini-pipeline filters to easily keep track of the progress performed by the internal filters. See DiscreteGaussianImageFilter.hxx for an implementation example.
Definition at line 40 of file itkProgressAccumulator.h.
Classes | |
struct | FilterRecord |
Public Types | |
using | ConstPointer = SmartPointer< const Self > |
using | GenericFilterPointer = GenericFilterType::Pointer |
using | GenericFilterType = ProcessObject |
using | Pointer = SmartPointer< Self > |
using | Self = ProgressAccumulator |
using | Superclass = Object |
Public Types inherited from itk::Object | |
using | ConstPointer = SmartPointer< const Self > |
using | Pointer = SmartPointer< Self > |
using | Self = Object |
using | Superclass = LightObject |
Public Types inherited from itk::LightObject | |
using | ConstPointer = SmartPointer< const Self > |
using | Pointer = SmartPointer< Self > |
using | Self = LightObject |
Public Member Functions | |
virtual float | GetAccumulatedProgress () const |
virtual ProcessObject * | GetModifiableMiniPipelineFilter () |
const char * | GetNameOfClass () const override |
void | RegisterInternalFilter (GenericFilterType *filter, float weight) |
virtual void | SetMiniPipelineFilter (ProcessObject *_arg) |
void | UnregisterAllFilters () |
Public Member Functions inherited from itk::Object | |
unsigned long | AddObserver (const EventObject &event, Command *cmd) const |
unsigned long | AddObserver (const EventObject &event, std::function< void(const EventObject &)> function) const |
LightObject::Pointer | CreateAnother () const override |
virtual void | DebugOff () const |
virtual void | DebugOn () const |
Command * | GetCommand (unsigned long tag) |
bool | GetDebug () const |
MetaDataDictionary & | GetMetaDataDictionary () |
const MetaDataDictionary & | GetMetaDataDictionary () const |
virtual ModifiedTimeType | GetMTime () const |
const char * | GetNameOfClass () const override |
virtual const TimeStamp & | GetTimeStamp () const |
bool | HasObserver (const EventObject &event) const |
void | InvokeEvent (const EventObject &) |
void | InvokeEvent (const EventObject &) const |
virtual void | Modified () const |
void | Register () const override |
void | RemoveAllObservers () |
void | RemoveObserver (unsigned long tag) const |
void | SetDebug (bool debugFlag) const |
void | SetReferenceCount (int) override |
void | UnRegister () const noexcept override |
void | SetMetaDataDictionary (const MetaDataDictionary &rhs) |
void | SetMetaDataDictionary (MetaDataDictionary &&rrhs) |
virtual void | SetObjectName (std::string _arg) |
virtual const std::string & | GetObjectName () const |
Public Member Functions inherited from itk::LightObject | |
Pointer | Clone () const |
virtual Pointer | CreateAnother () const |
virtual void | Delete () |
virtual const char * | GetNameOfClass () const |
virtual int | GetReferenceCount () const |
void | Print (std::ostream &os, Indent indent=0) const |
virtual void | Register () const |
virtual void | SetReferenceCount (int) |
virtual void | UnRegister () const noexcept |
Static Public Member Functions | |
static Pointer | New () |
Static Public Member Functions inherited from itk::Object | |
static bool | GetGlobalWarningDisplay () |
static void | GlobalWarningDisplayOff () |
static void | GlobalWarningDisplayOn () |
static Pointer | New () |
static void | SetGlobalWarningDisplay (bool val) |
Static Public Member Functions inherited from itk::LightObject | |
static void | BreakOnError () |
static Pointer | New () |
Protected Member Functions | |
void | PrintSelf (std::ostream &os, Indent indent) const override |
ProgressAccumulator () | |
~ProgressAccumulator () override | |
Protected Member Functions inherited from itk::Object | |
Object () | |
bool | PrintObservers (std::ostream &os, Indent indent) const |
void | PrintSelf (std::ostream &os, Indent indent) const override |
virtual void | SetTimeStamp (const TimeStamp &timeStamp) |
~Object () override | |
Protected Member Functions inherited from itk::LightObject | |
virtual LightObject::Pointer | InternalClone () const |
LightObject () | |
virtual void | PrintHeader (std::ostream &os, Indent indent) const |
virtual void | PrintSelf (std::ostream &os, Indent indent) const |
virtual void | PrintTrailer (std::ostream &os, Indent indent) const |
virtual | ~LightObject () |
Private Types | |
using | CommandPointer = CommandType::Pointer |
using | CommandType = MemberCommand< Self > |
using | FilterRecordVector = std::vector< struct FilterRecord > |
Private Member Functions | |
void | ReportProgress (Object *who, const EventObject &event) |
Private Attributes | |
float | m_AccumulatedProgress {} |
float | m_BaseAccumulatedProgress {} |
CommandPointer | m_CallbackCommand {} |
FilterRecordVector | m_FilterRecord {} |
GenericFilterPointer | m_MiniPipelineFilter {} |
Additional Inherited Members | |
Protected Attributes inherited from itk::LightObject | |
std::atomic< int > | m_ReferenceCount {} |
|
private |
Definition at line 128 of file itkProgressAccumulator.h.
|
private |
Command for observing progress of pipeline filters
Definition at line 127 of file itkProgressAccumulator.h.
using itk::ProgressAccumulator::ConstPointer = SmartPointer<const Self> |
Definition at line 48 of file itkProgressAccumulator.h.
|
private |
An array of record structures
Definition at line 154 of file itkProgressAccumulator.h.
Definition at line 52 of file itkProgressAccumulator.h.
Typedef for inputting filters
Definition at line 51 of file itkProgressAccumulator.h.
Definition at line 47 of file itkProgressAccumulator.h.
Standard class type aliases.
Definition at line 45 of file itkProgressAccumulator.h.
Definition at line 46 of file itkProgressAccumulator.h.
|
protected |
|
overrideprotected |
|
virtual |
Get the total progress accumulated by this object
|
virtual |
Set the mini-pipeline filter
|
overridevirtual |
Reimplemented from itk::Object.
|
static |
Standard New method.
|
overrideprotectedvirtual |
Methods invoked by Print() to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.
Reimplemented from itk::Object.
void itk::ProgressAccumulator::RegisterInternalFilter | ( | GenericFilterType * | filter, |
float | weight | ||
) |
Register a filter with the progress accumulator and specify the fraction of the overall progress associated with this filter. The sum of the weights for all filters that are registered should be 1. However, if streaming is used, the weight should be divided by the number of streams because each stream will reset the filter after capturing its progress. For example, if the desired weight of a filter is 0.4, but it is streamed into 4 streams, the weight should be 0.1. The ProgressAccumulator will then ensure that each of the 4 runs of this filter will add 0.1 to the filter's progress.
|
private |
A callback function that is called by the progressing filters
|
virtual |
Set the mini-pipeline filter
void itk::ProgressAccumulator::UnregisterAllFilters | ( | ) |
Unregister all filters that have been registered with this object
|
private |
The total accumulated progress
Definition at line 157 of file itkProgressAccumulator.h.
|
private |
The total accumulated progress for multiple runs of the mini-pipeline
Definition at line 160 of file itkProgressAccumulator.h.
|
private |
The callback command
Definition at line 169 of file itkProgressAccumulator.h.
|
private |
A list of progress proportions of the different filters in the pipeline
Definition at line 166 of file itkProgressAccumulator.h.
|
private |
The client mini-pipeline filter
Definition at line 151 of file itkProgressAccumulator.h.