controller for extract generation More...
#include <vtkSMExtractsController.h>
Public Types | |
typedef vtkObject | Superclass |
Public Member Functions | |
virtual const char * | GetClassName () |
virtual int | IsA (const char *type) |
void | PrintSelf (ostream &os, vtkIndent indent) override |
const char * | GetRealExtractsOutputDirectory () const |
Returns the extract output directory to use. More... | |
bool | Extract (vtkSMProxy *extractor) |
Generate the extract for the current state. More... | |
bool | Extract (vtkSMSessionProxyManager *pxm) |
Generate the extract for the current state. More... | |
bool | Extract () |
Generate the extract for the current state. More... | |
bool | Extract (vtkCollection *collection) |
Generate extract s for the current state using only the extractors in the collection. More... | |
bool | IsTriggerActivated (vtkSMProxy *extractor) |
Same as IsAnyTriggerActivated except only check the selected extractor's trigger definition. More... | |
std::vector< vtkSMProxy * > | FindExtractors (vtkSMProxy *proxy) const |
Returns a list of extractors associated with the proxy. More... | |
std::vector< vtkSMProxy * > | GetSupportedExtractorPrototypes (vtkSMProxy *proxy) const |
Returns a list of prototype proxies for extractors that can be attached to the given proxy . More... | |
bool | CanExtract (vtkSMProxy *extractor, const std::vector< vtkSMProxy *> &inputs) const |
Returns true is the given extractor (or prototype of the same) can extract the selected set of proxies at the same time. More... | |
bool | CanExtract (vtkSMProxy *extractor, vtkSMProxy *input) const |
vtkSMProxy * | CreateSteeringExtractor (vtkSMProxy *proxy, const char *registrationName=nullptr) const |
Creates and initializes a new steering extractor. More... | |
vtkSMProxy * | GetInputForExtractor (vtkSMProxy *extractor) const |
Given an extractor proxy, returns the producer for the extractor, if any. More... | |
vtkTable * | GetSummaryTable () const |
Get access to the summary table generated so far. More... | |
void | ResetSummaryTable () |
Reset summary table. More... | |
bool | SaveSummaryTable (const std::string &fname, vtkSMSessionProxyManager *pxm) |
Saves summary table to a file. More... | |
virtual void | SetTimeStep (int) |
Information about current time/timestep. More... | |
virtual int | GetTimeStep () |
Information about current time/timestep. More... | |
virtual void | SetTime (double) |
Information about current time/timestep. More... | |
virtual double | GetTime () |
Information about current time/timestep. More... | |
virtual void | SetExtractsOutputDirectory (const char *) |
Get/Set the root directory to use for writing extracts. More... | |
virtual char * | GetExtractsOutputDirectory () |
Get/Set the root directory to use for writing extracts. More... | |
bool | IsAnyTriggerActivated (vtkSMSessionProxyManager *pxm) |
Check if any of the extractors registered with the chosen proxy-manager (or active proxy-manager, is none specified) has their trigger activated given the current state of the application and the values for Time and TimeStep set on the controller. More... | |
bool | IsAnyTriggerActivated () |
Check if any of the extractors registered with the chosen proxy-manager (or active proxy-manager, is none specified) has their trigger activated given the current state of the application and the values for Time and TimeStep set on the controller. More... | |
bool | IsAnyTriggerActivated (vtkCollection *collection) |
Check if any of the extractors registered with the chosen proxy-manager (or active proxy-manager, is none specified) has their trigger activated given the current state of the application and the values for Time and TimeStep set on the controller. More... | |
vtkSMProxy * | CreateExtractor (vtkSMProxy *proxy, const char *xmlname, const char *registrationName=nullptr) const |
Creates, initializes and registers a new extractor of the chosen type. More... | |
Public Member Functions inherited from vtkObject | |
vtkBaseTypeMacro (vtkObject, vtkObjectBase) | |
virtual void | DebugOn () |
virtual void | DebugOff () |
bool | GetDebug () |
void | SetDebug (bool debugFlag) |
virtual void | Modified () |
virtual vtkMTimeType | GetMTime () |
void | RemoveObserver (unsigned long tag) |
void | RemoveObservers (unsigned long event) |
void | RemoveObservers (const char *event) |
void | RemoveAllObservers () |
int | HasObserver (unsigned long event) |
int | HasObserver (const char *event) |
int | InvokeEvent (unsigned long event) |
int | InvokeEvent (const char *event) |
unsigned long | AddObserver (unsigned long event, vtkCommand *, float priority=0.0f) |
unsigned long | AddObserver (const char *event, vtkCommand *, float priority=0.0f) |
vtkCommand * | GetCommand (unsigned long tag) |
void | RemoveObserver (vtkCommand *) |
void | RemoveObservers (unsigned long event, vtkCommand *) |
void | RemoveObservers (const char *event, vtkCommand *) |
int | HasObserver (unsigned long event, vtkCommand *) |
int | HasObserver (const char *event, vtkCommand *) |
unsigned long | AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f) |
unsigned long | AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f) |
unsigned long | AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f) |
int | InvokeEvent (unsigned long event, void *callData) |
int | InvokeEvent (const char *event, void *callData) |
unsigned long | AddObserver (unsigned long event, vtkCommand *, float priority=0.0f) |
unsigned long | AddObserver (const char *event, vtkCommand *, float priority=0.0f) |
vtkCommand * | GetCommand (unsigned long tag) |
void | RemoveObserver (vtkCommand *) |
void | RemoveObservers (unsigned long event, vtkCommand *) |
void | RemoveObservers (const char *event, vtkCommand *) |
int | HasObserver (unsigned long event, vtkCommand *) |
int | HasObserver (const char *event, vtkCommand *) |
unsigned long | AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f) |
unsigned long | AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f) |
unsigned long | AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f) |
int | InvokeEvent (unsigned long event, void *callData) |
int | InvokeEvent (const char *event, void *callData) |
Public Member Functions inherited from vtkObjectBase | |
const char * | GetClassName () const |
virtual void | Delete () |
virtual void | FastDelete () |
void | Print (ostream &os) |
virtual void | Register (vtkObjectBase *o) |
virtual void | UnRegister (vtkObjectBase *o) |
void | SetReferenceCount (int) |
virtual void | PrintHeader (ostream &os, vtkIndent indent) |
virtual void | PrintTrailer (ostream &os, vtkIndent indent) |
int | GetReferenceCount () |
void | PrintRevisions (ostream &) |
virtual void | PrintHeader (ostream &os, vtkIndent indent) |
virtual void | PrintTrailer (ostream &os, vtkIndent indent) |
int | GetReferenceCount () |
void | PrintRevisions (ostream &) |
Static Public Member Functions | |
static vtkSMExtractsController * | New () |
static int | IsTypeOf (const char *type) |
static vtkSMExtractsController * | SafeDownCast (vtkObject *o) |
static bool | IsExtractor (vtkSMProxy *extractor, vtkSMProxy *proxy) |
Returns true is the extractor is an extractor for the proxy . More... | |
static bool | IsExtractorEnabled (vtkSMProxy *extractor) |
Returns true of the extractor is enabled. More... | |
static void | SetExtractorEnabled (vtkSMProxy *extractor, bool val) |
Enable/disable an extractor. More... | |
Static Public Member Functions inherited from vtkObject | |
static vtkObject * | New () |
static void | BreakOnError () |
static void | SetGlobalWarningDisplay (int val) |
static void | GlobalWarningDisplayOn () |
static void | GlobalWarningDisplayOff () |
static int | GetGlobalWarningDisplay () |
static void | SetGlobalWarningDisplay (int val) |
static void | GlobalWarningDisplayOn () |
static void | GlobalWarningDisplayOff () |
static int | GetGlobalWarningDisplay () |
Static Public Member Functions inherited from vtkObjectBase | |
static vtkTypeBool | IsTypeOf (const char *name) |
static vtkObjectBase * | New () |
static vtkObjectBase * | New () |
Protected Member Functions | |
vtkSMExtractsController () | |
~vtkSMExtractsController () override | |
std::string | GetName (vtkSMExtractWriterProxy *writer) |
Returns a friendly name derived from the extract writer. More... | |
bool | CreateExtractsOutputDirectory (vtkSMSessionProxyManager *pxm) const |
These methods are intended to be use by vtkSMExtractWriterProxy and subclasses to ensure chosen output directories are created before attempting to generate extracts. More... | |
bool | CreateDir (const std::string &dname, vtkSMSessionProxyManager *pxm) const |
These methods are intended to be use by vtkSMExtractWriterProxy and subclasses to ensure chosen output directories are created before attempting to generate extracts. More... | |
Protected Member Functions inherited from vtkObject | |
vtkObject () | |
virtual | ~vtkObject () |
void | RegisterInternal (vtkObjectBase *, vtkTypeBool check) VTK_OVERRIDE |
void | UnRegisterInternal (vtkObjectBase *, vtkTypeBool check) VTK_OVERRIDE |
void | InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=NULL) |
void | InternalReleaseFocus () |
void | InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=NULL) |
void | InternalReleaseFocus () |
Protected Member Functions inherited from vtkObjectBase | |
vtkObjectBase () | |
virtual | ~vtkObjectBase () |
virtual void | CollectRevisions (ostream &) |
virtual void | ReportReferences (vtkGarbageCollector *) |
vtkObjectBase (const vtkObjectBase &) | |
void | operator= (const vtkObjectBase &) |
using | SummaryParametersT = std::map< std::string, std::string > |
Called by vtkSMExtractWriterProxy subclasses to add an entry to the summary table. More... | |
bool | AddSummaryEntry (vtkSMExtractWriterProxy *writer, const std::string &filename, const SummaryParametersT ¶ms=SummaryParametersT{}) |
Called by vtkSMExtractWriterProxy subclasses to add an entry to the summary table. More... | |
Additional Inherited Members | |
Protected Attributes inherited from vtkObject | |
bool | Debug |
vtkTimeStamp | MTime |
vtkSubjectHelper * | SubjectHelper |
Protected Attributes inherited from vtkObjectBase | |
vtkAtomicInt32 | ReferenceCount |
vtkWeakPointerBase ** | WeakPointers |
controller for extract generation
vtkSMExtractsController is a controllers that provides API to handle various aspects of extractors and extract generation mechanisms supported by ParaView.
It provides API to query, create extractors of known types. It also provides API to generate extracts using the defined extractors.
vtkSMExtractsController generates a summary table for all extracts generated. Each row in this summary table corresponds to an extract generated. Each column provides information about that extract. Filename for the extract is stored in a column named FILE_[type]
where [type]
is replaced by the extension of the file. Other columns are used to stored named values that characterize the extract.
Currently, this summary table is used to generated a Cinema specification which can be used to explore the generated extracts using Cinema tools (https://cinemascience.github.io/).
Definition at line 45 of file vtkSMExtractsController.h.
Definition at line 49 of file vtkSMExtractsController.h.
using vtkSMExtractsController::SummaryParametersT = std::map<std::string, std::string> |
Called by vtkSMExtractWriterProxy subclasses to add an entry to the summary table.
Note, this must be called for every extract written out by the extract writer.
Definition at line 209 of file vtkSMExtractsController.h.
|
protected |
|
overrideprotected |
|
static |
|
virtual |
Reimplemented from vtkObjectBase.
|
static |
|
overridevirtual |
Reimplemented from vtkObject.
|
virtual |
Information about current time/timestep.
This must be set correctly before using Extract
to generate extracts.
|
virtual |
Information about current time/timestep.
This must be set correctly before using Extract
to generate extracts.
|
virtual |
Information about current time/timestep.
This must be set correctly before using Extract
to generate extracts.
|
virtual |
Information about current time/timestep.
This must be set correctly before using Extract
to generate extracts.
|
virtual |
Get/Set the root directory to use for writing extracts.
This must be set correctly before using Extract
to generate extracts.
PARAVIEW_OVERRIDE_EXTRACTS_OUTPUT_DIRECTORY
. If set, the value specified here ignored and the environment variable is used instead.
|
virtual |
Get/Set the root directory to use for writing extracts.
This must be set correctly before using Extract
to generate extracts.
PARAVIEW_OVERRIDE_EXTRACTS_OUTPUT_DIRECTORY
. If set, the value specified here ignored and the environment variable is used instead. const char* vtkSMExtractsController::GetRealExtractsOutputDirectory | ( | ) | const |
Returns the extract output directory to use.
If PARAVIEW_OVERRIDE_EXTRACTS_OUTPUT_DIRECTORY
is not set, this will be same as GetExtractsOutputDirectory
else this will be the value of the PARAVIEW_OVERRIDE_EXTRACTS_OUTPUT_DIRECTORY
environment variable.
bool vtkSMExtractsController::Extract | ( | vtkSMProxy * | extractor | ) |
Generate the extract for the current state.
Returns true if extract was generated, false if skipped or failed.
This overload generates extract from the specific extractor.
bool vtkSMExtractsController::Extract | ( | vtkSMSessionProxyManager * | pxm | ) |
Generate the extract for the current state.
Returns true if extract was generated, false if skipped or failed.
This overload generates extracts from all extractors registered with the proxy-manager.
bool vtkSMExtractsController::Extract | ( | ) |
Generate the extract for the current state.
Returns true if extract was generated, false if skipped or failed.
This overload locates the active session and then simply calls Extract(vtkSMSessionProxyManager*).
bool vtkSMExtractsController::Extract | ( | vtkCollection * | collection | ) |
Generate extract s for the current state using only the extractors in the collection.
bool vtkSMExtractsController::IsAnyTriggerActivated | ( | vtkSMSessionProxyManager * | pxm | ) |
Check if any of the extractors registered with the chosen proxy-manager (or active proxy-manager, is none specified) has their trigger activated given the current state of the application and the values for Time and TimeStep set on the controller.
bool vtkSMExtractsController::IsAnyTriggerActivated | ( | ) |
Check if any of the extractors registered with the chosen proxy-manager (or active proxy-manager, is none specified) has their trigger activated given the current state of the application and the values for Time and TimeStep set on the controller.
bool vtkSMExtractsController::IsAnyTriggerActivated | ( | vtkCollection * | collection | ) |
Check if any of the extractors registered with the chosen proxy-manager (or active proxy-manager, is none specified) has their trigger activated given the current state of the application and the values for Time and TimeStep set on the controller.
bool vtkSMExtractsController::IsTriggerActivated | ( | vtkSMProxy * | extractor | ) |
Same as IsAnyTriggerActivated
except only check the selected extractor's trigger definition.
std::vector<vtkSMProxy*> vtkSMExtractsController::FindExtractors | ( | vtkSMProxy * | proxy | ) | const |
Returns a list of extractors associated with the proxy.
std::vector<vtkSMProxy*> vtkSMExtractsController::GetSupportedExtractorPrototypes | ( | vtkSMProxy * | proxy | ) | const |
Returns a list of prototype proxies for extractors that can be attached to the given proxy
.
bool vtkSMExtractsController::CanExtract | ( | vtkSMProxy * | extractor, |
const std::vector< vtkSMProxy *> & | inputs | ||
) | const |
Returns true is the given extractor (or prototype of the same) can extract the selected set of proxies at the same time.
|
inline |
Definition at line 151 of file vtkSMExtractsController.h.
vtkSMProxy* vtkSMExtractsController::CreateExtractor | ( | vtkSMProxy * | proxy, |
const char * | xmlname, | ||
const char * | registrationName = nullptr |
||
) | const |
Creates, initializes and registers a new extractor of the chosen type.
vtkSMProxy* vtkSMExtractsController::CreateSteeringExtractor | ( | vtkSMProxy * | proxy, |
const char * | registrationName = nullptr |
||
) | const |
Creates and initializes a new steering extractor.
|
static |
Returns true is the extractor
is an extractor for the proxy
.
vtkSMProxy* vtkSMExtractsController::GetInputForExtractor | ( | vtkSMProxy * | extractor | ) | const |
Given an extractor proxy, returns the producer for the extractor, if any.
May return a vtkSMViewProxy or a vtkSMOutputPort.
vtkTable* vtkSMExtractsController::GetSummaryTable | ( | ) | const |
Get access to the summary table generated so far.
This will be nullptr until the first extract is generated.
See Summary of generated extracts for information about summary table.
void vtkSMExtractsController::ResetSummaryTable | ( | ) |
Reset summary table.
Generally not needed since there is not much use for reusing vtkSMExtractsController, one should just create a new one when needed.
bool vtkSMExtractsController::SaveSummaryTable | ( | const std::string & | fname, |
vtkSMSessionProxyManager * | pxm | ||
) |
Saves summary table to a file.
Path is relative to the ExtractsOutputDirectory.
bool vtkSMExtractsController::AddSummaryEntry | ( | vtkSMExtractWriterProxy * | writer, |
const std::string & | filename, | ||
const SummaryParametersT & | params = SummaryParametersT{} |
||
) |
Called by vtkSMExtractWriterProxy subclasses to add an entry to the summary table.
Note, this must be called for every extract written out by the extract writer.
|
static |
Returns true of the extractor is enabled.
|
static |
Enable/disable an extractor.
|
protected |
These methods are intended to be use by vtkSMExtractWriterProxy and subclasses to ensure chosen output directories are created before attempting to generate extracts.
Return true on success, or false to failed to create writeable directories. Extract writers should not attempt to write any extracts when that happens.
|
protected |
These methods are intended to be use by vtkSMExtractWriterProxy and subclasses to ensure chosen output directories are created before attempting to generate extracts.
Return true on success, or false to failed to create writeable directories. Extract writers should not attempt to write any extracts when that happens.
|
protected |
Returns a friendly name derived from the extract writer.