Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
vtkSMExtractsController Class Reference

controller for extract generation More...

#include <vtkSMExtractsController.h>

Inheritance diagram for vtkSMExtractsController:
Inheritance graph
[legend]
Collaboration diagram for vtkSMExtractsController:
Collaboration graph
[legend]

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
 
vtkSMProxyCreateSteeringExtractor (vtkSMProxy *proxy, const char *registrationName=nullptr) const
 Creates and initializes a new steering extractor. More...
 
vtkSMProxyGetInputForExtractor (vtkSMProxy *extractor) const
 Given an extractor proxy, returns the producer for the extractor, if any. More...
 
vtkTableGetSummaryTable () 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...
 
vtkSMProxyCreateExtractor (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)
 
vtkCommandGetCommand (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)
 
vtkCommandGetCommand (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 vtkSMExtractsControllerNew ()
 
static int IsTypeOf (const char *type)
 
static vtkSMExtractsControllerSafeDownCast (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 vtkObjectNew ()
 
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 vtkObjectBaseNew ()
 
static vtkObjectBaseNew ()
 

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 &params=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
 

Detailed Description

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.

Summary of generated extracts

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.

Member Typedef Documentation

◆ Superclass

Definition at line 49 of file vtkSMExtractsController.h.

◆ 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.

Definition at line 209 of file vtkSMExtractsController.h.

Constructor & Destructor Documentation

◆ vtkSMExtractsController()

vtkSMExtractsController::vtkSMExtractsController ( )
protected

◆ ~vtkSMExtractsController()

vtkSMExtractsController::~vtkSMExtractsController ( )
overrideprotected

Member Function Documentation

◆ New()

static vtkSMExtractsController* vtkSMExtractsController::New ( )
static

◆ GetClassName()

virtual const char* vtkSMExtractsController::GetClassName ( )
virtual

◆ IsTypeOf()

static int vtkSMExtractsController::IsTypeOf ( const char *  type)
static

◆ IsA()

virtual int vtkSMExtractsController::IsA ( const char *  type)
virtual

Reimplemented from vtkObjectBase.

◆ SafeDownCast()

static vtkSMExtractsController* vtkSMExtractsController::SafeDownCast ( vtkObject o)
static

◆ PrintSelf()

void vtkSMExtractsController::PrintSelf ( ostream &  os,
vtkIndent  indent 
)
overridevirtual

Reimplemented from vtkObject.

◆ SetTimeStep()

virtual void vtkSMExtractsController::SetTimeStep ( int  )
virtual

Information about current time/timestep.

This must be set correctly before using Extract to generate extracts.

◆ GetTimeStep()

virtual int vtkSMExtractsController::GetTimeStep ( )
virtual

Information about current time/timestep.

This must be set correctly before using Extract to generate extracts.

◆ SetTime()

virtual void vtkSMExtractsController::SetTime ( double  )
virtual

Information about current time/timestep.

This must be set correctly before using Extract to generate extracts.

◆ GetTime()

virtual double vtkSMExtractsController::GetTime ( )
virtual

Information about current time/timestep.

This must be set correctly before using Extract to generate extracts.

◆ SetExtractsOutputDirectory()

virtual void vtkSMExtractsController::SetExtractsOutputDirectory ( const char *  )
virtual

Get/Set the root directory to use for writing extracts.

This must be set correctly before using Extract to generate extracts.

Note
This can be overridden at runtime using environment variable PARAVIEW_OVERRIDE_EXTRACTS_OUTPUT_DIRECTORY. If set, the value specified here ignored and the environment variable is used instead.

◆ GetExtractsOutputDirectory()

virtual char* vtkSMExtractsController::GetExtractsOutputDirectory ( )
virtual

Get/Set the root directory to use for writing extracts.

This must be set correctly before using Extract to generate extracts.

Note
This can be overridden at runtime using environment variable PARAVIEW_OVERRIDE_EXTRACTS_OUTPUT_DIRECTORY. If set, the value specified here ignored and the environment variable is used instead.

◆ GetRealExtractsOutputDirectory()

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.

◆ Extract() [1/4]

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.

◆ Extract() [2/4]

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.

◆ Extract() [3/4]

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*).

◆ Extract() [4/4]

bool vtkSMExtractsController::Extract ( vtkCollection collection)

Generate extract s for the current state using only the extractors in the collection.

◆ IsAnyTriggerActivated() [1/3]

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.

◆ IsAnyTriggerActivated() [2/3]

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.

◆ IsAnyTriggerActivated() [3/3]

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.

◆ IsTriggerActivated()

bool vtkSMExtractsController::IsTriggerActivated ( vtkSMProxy extractor)

Same as IsAnyTriggerActivated except only check the selected extractor's trigger definition.

◆ FindExtractors()

std::vector<vtkSMProxy*> vtkSMExtractsController::FindExtractors ( vtkSMProxy proxy) const

Returns a list of extractors associated with the proxy.

◆ GetSupportedExtractorPrototypes()

std::vector<vtkSMProxy*> vtkSMExtractsController::GetSupportedExtractorPrototypes ( vtkSMProxy proxy) const

Returns a list of prototype proxies for extractors that can be attached to the given proxy.

◆ CanExtract() [1/2]

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.

◆ CanExtract() [2/2]

bool vtkSMExtractsController::CanExtract ( vtkSMProxy extractor,
vtkSMProxy input 
) const
inline

Definition at line 151 of file vtkSMExtractsController.h.

◆ CreateExtractor()

vtkSMProxy* vtkSMExtractsController::CreateExtractor ( vtkSMProxy proxy,
const char *  xmlname,
const char *  registrationName = nullptr 
) const

Creates, initializes and registers a new extractor of the chosen type.

◆ CreateSteeringExtractor()

vtkSMProxy* vtkSMExtractsController::CreateSteeringExtractor ( vtkSMProxy proxy,
const char *  registrationName = nullptr 
) const

Creates and initializes a new steering extractor.

◆ IsExtractor()

static bool vtkSMExtractsController::IsExtractor ( vtkSMProxy extractor,
vtkSMProxy proxy 
)
static

Returns true is the extractor is an extractor for the proxy.

◆ GetInputForExtractor()

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.

◆ GetSummaryTable()

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.

◆ ResetSummaryTable()

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.

◆ SaveSummaryTable()

bool vtkSMExtractsController::SaveSummaryTable ( const std::string fname,
vtkSMSessionProxyManager pxm 
)

Saves summary table to a file.

Path is relative to the ExtractsOutputDirectory.

◆ AddSummaryEntry()

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.

◆ IsExtractorEnabled()

static bool vtkSMExtractsController::IsExtractorEnabled ( vtkSMProxy extractor)
static

Returns true of the extractor is enabled.

◆ SetExtractorEnabled()

static void vtkSMExtractsController::SetExtractorEnabled ( vtkSMProxy extractor,
bool  val 
)
static

Enable/disable an extractor.

◆ CreateExtractsOutputDirectory()

bool vtkSMExtractsController::CreateExtractsOutputDirectory ( vtkSMSessionProxyManager pxm) const
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.

◆ CreateDir()

bool vtkSMExtractsController::CreateDir ( const std::string dname,
vtkSMSessionProxyManager pxm 
) const
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.

◆ GetName()

std::string vtkSMExtractsController::GetName ( vtkSMExtractWriterProxy writer)
protected

Returns a friendly name derived from the extract writer.


The documentation for this class was generated from the following file: