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

domain used to restrict an vtkSMIntVectorProperty values to valid flat-index for a vtkCompositeDataSet. More...

#include <vtkSMCompositeTreeDomain.h>

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

Public Types

enum  {
  ALL = 0, LEAVES = 1, NON_LEAVES = 2, NONE = 3,
  AMR = 4
}
 
enum  DefaultModes { DEFAULT = 0, NONEMPTY_LEAF = 1 }
 
typedef vtkSMDomain Superclass
 
- Public Types inherited from vtkSMDomain
enum  IsInDomainReturnCodes { NOT_APPLICABLE = -1, NOT_IN_DOMAIN = 0, IN_DOMAIN = 1 }
 Return values for IsInDomain calls. More...
 
typedef vtkSMSessionObject Superclass
 
- Public Types inherited from vtkSMSessionObject
typedef vtkSMObject Superclass
 
- Public Types inherited from vtkSMObject
typedef vtkObject Superclass
 

Public Member Functions

virtual const char * GetClassName ()
 
virtual int IsA (const char *type)
 
void PrintSelf (ostream &os, vtkIndent indent) override
 
void Update (vtkSMProperty *input) override
 Called when the 'required-property' is modified. More...
 
vtkDataAssembly * GetHierarchy () const
 Returns vtkDataAssembly representing the hierarchy. More...
 
int IsInDomain (vtkSMProperty *vtkNotUsed(property)) override
 Is the (unchecked) value of the property in the domain? Overwritten by sub-classes. More...
 
int SetDefaultValues (vtkSMProperty *, bool use_unchecked_values) override
 A vtkSMProperty is often defined with a default value in the XML itself. More...
 
virtual vtkPVDataInformationGetInformation ()
 Get the vtkPVDataInformation which provides the tree structure for the composite dataset. More...
 
virtual int GetMode ()
 Mode indicates if the property is interested in all nodes, leaves only or non-leaves only. More...
 
virtual void SetMode (int)
 Mode indicates if the property is interested in all nodes, leaves only or non-leaves only. More...
 
virtual int GetDefaultMode ()
 DefaultMode controls how the default value for the property is set by SetDefaultValues(). More...
 
virtual void SetDefaultMode (int)
 DefaultMode controls how the default value for the property is set by SetDefaultValues(). More...
 
- Public Member Functions inherited from vtkSMDomain
void PrintSelf (ostream &os, vtkIndent indent) override
 
virtual void SetAnimationValue (vtkSMProperty *, int vtkNotUsed(index), double vtkNotUsed(value))
 Set the value of an element of a property from the animation editor. More...
 
virtual int SetDefaultValues (vtkSMProperty *, bool vtkNotUsed(use_unchecked_values))
 A vtkSMProperty is often defined with a default value in the XML itself. More...
 
vtkSMPropertyGetProperty ()
 Provides access to the vtkSMProperty on which this domain is hooked up. More...
 
virtual unsigned int GetNumberOfInputConnections (const char *function)
 Helper method to get the number of input connections hence the number of available vtkPVDataInformation from input proxy connected to the required property with the given function. More...
 
vtkSMPropertyGetRequiredProperty (const char *function)
 Returns a given required property of the given function. More...
 
virtual char * GetXMLName ()
 Assigned by the XML parser. More...
 
virtual bool GetIsOptional ()
 When the IsOptional flag is set, IsInDomain() always returns true. More...
 
virtual vtkPVDataInformationGetInputDataInformation (const char *function, unsigned int index=0)
 Helper methods to get vtkPVDataInformation from input proxy connected to the required property with the given function and provided input index. More...
 
virtual vtkPVDataInformationGetInputSubsetDataInformation (unsigned int compositeIndex, const char *function, unsigned int index=0)
 Helper methods to get vtkPVDataInformation from input proxy connected to the required property with the given function and provided input index. More...
 
virtual vtkPVDataInformationGetInputSubsetDataInformation (const char *selector, const char *assemblyName, const char *function, unsigned int index=0)
 Helper methods to get vtkPVDataInformation from input proxy connected to the required property with the given function and provided input index. More...
 
- Public Member Functions inherited from vtkSMSessionObject
void PrintSelf (ostream &os, vtkIndent indent) override
 
virtual vtkSMSessionProxyManagerGetSessionProxyManager ()
 Return the corresponding ProxyManager if any. More...
 
virtual void SetSession (vtkSMSession *)
 Get/Set the session on wihch this object exists. More...
 
virtual vtkSMSessionGetSession ()
 Get/Set the session on wihch this object exists. 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 vtkSMCompositeTreeDomainNew ()
 
static int IsTypeOf (const char *type)
 
static vtkSMCompositeTreeDomainSafeDownCast (vtkObject *o)
 
- Static Public Member Functions inherited from vtkSMDomain
static vtkSMDomainNew ()
 
static int IsTypeOf (const char *type)
 
static vtkSMDomainSafeDownCast (vtkObject *o)
 
- Static Public Member Functions inherited from vtkSMSessionObject
static vtkSMSessionObjectNew ()
 
static int IsTypeOf (const char *type)
 
static vtkSMSessionObjectSafeDownCast (vtkObject *o)
 
- Static Public Member Functions inherited from vtkSMObject
static vtkSMObjectNew ()
 
static int IsTypeOf (const char *type)
 
static vtkSMObjectSafeDownCast (vtkObject *o)
 
static std::string CreatePrettyLabel (const std::string &name)
 Return a well-formated label using provided name by adding spaces between lower cases and upper cases: 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

 vtkSMCompositeTreeDomain ()
 
 ~vtkSMCompositeTreeDomain () override
 
int ReadXMLAttributes (vtkSMProperty *prop, vtkPVXMLElement *element) override
 Set the appropriate ivars from the xml element. More...
 
void SetInformation (vtkPVDataInformation *)
 
- Protected Member Functions inherited from vtkSMDomain
 vtkSMDomain ()
 
 ~vtkSMDomain () override
 
virtual int LoadState (vtkPVXMLElement *vtkNotUsed(domainElement), vtkSMProxyLocator *vtkNotUsed(loader))
 Load the state of the domain from the XML. More...
 
void RemoveRequiredProperty (vtkSMProperty *prop)
 Remove the given property from the required properties list. More...
 
void AddRequiredProperty (vtkSMProperty *prop, const char *function)
 Add a new required property to this domain. More...
 
void DomainModified ()
 Invokes DomainModifiedEvent. More...
 
void InvokeModified ()
 
unsigned int GetNumberOfRequiredProperties ()
 Gets the number of required properties added. More...
 
void SetProperty (vtkSMProperty *)
 Set the domain's property. More...
 
void SaveState (vtkPVXMLElement *parent, const char *uid)
 Add the header and creates a new vtkPVXMLElement for the domain, fills it up with the common attributes. More...
 
virtual void ChildSaveState (vtkPVXMLElement *domainElement)
 Add the header and creates a new vtkPVXMLElement for the domain, fills it up with the common attributes. More...
 
virtual void SetIsOptional (bool)
 When the IsOptional flag is set, IsInDomain() always returns true. More...
 
virtual void SetXMLName (const char *)
 Assigned by the XML parser. More...
 
- Protected Member Functions inherited from vtkSMSessionObject
 vtkSMSessionObject ()
 
 ~vtkSMSessionObject () override
 
- Protected Member Functions inherited from vtkSMObject
 vtkSMObject ()
 
 ~vtkSMObject () override
 
- 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 &)
 

Protected Attributes

vtkPVDataInformationInformation
 
int Mode
 
int DefaultMode
 
- Protected Attributes inherited from vtkSMDomain
char * XMLName
 
bool IsOptional
 
vtkSMDomainInternals * Internals
 
- Protected Attributes inherited from vtkSMSessionObject
vtkWeakPointer< vtkSMSessionSession
 Identifies the session id to which this object is related. More...
 
- Protected Attributes inherited from vtkObject
bool Debug
 
vtkTimeStamp MTime
 
vtkSubjectHelper * SubjectHelper
 
- Protected Attributes inherited from vtkObjectBase
vtkAtomicInt32 ReferenceCount
 
vtkWeakPointerBase ** WeakPointers
 

Detailed Description

domain used to restrict an vtkSMIntVectorProperty values to valid flat-index for a vtkCompositeDataSet.

vtkSMCompositeTreeDomain should be considered deprecated. New code should no longer use this domain. Developers are encouraged to update filters to not rely on composite-index and instead use selectors to select blocks. See vtkSMDataAssemblyDomain.

vtkSMCompositeTreeDomain can be added to a vtkSMIntVectorProperty. This domain requires a vtkSMInputProperty which is used to provide the input to the filter. This domain obtains data information from the input selected on the required input property and then decides the range for values the property can have.

Broadly speaking, there are two ways of identifying unique node in a composite dataset: flat-index (also called composite-index) and level-block-index. flat-index applies to all types of composite datasets while level-block-index (or just level-index) applies only to AMR datasets. flat-index for any node in an arbitrary composite-dataset is simply the index of that node in a pre-order traversal of the tree with the root composite-dataset getting the index 0. level-index for an AMR dataset is the AMR level number while level-block-index is a pair of the AMR level number and block number for the node in that level.

The type of index the property expects, is defined by the domain's mode. Supported modes are:

  1. vtkSMCompositeTreeDomain::ALL: (default)
    The property uses flat-index and can accept index for any node (leaf or non-leaf). This can be specified in XML using the mode="all".
  2. vtkSMCompositeTreeDomain::LEAVES:
    The property uses flat-index however can only accept flat-indices for leaf-nodes. This can be specified in XML using the mode="leaves".
  3. vtkSMCompositeTreeDomain::AMR:
    The property uses level-index i.e. AMR level number or level-block-index. If the property has 2 elements (or for repeatable properties, if number of elements per command is 2) then level-block-index is used, otherwise simply the level-index is used. This only makes sense for filters dealing with AMR datasets. This can be specified in XML using the mode="amr".
  4. vtkSMCompositeTreeDomain::NON_LEAVES: (deprecated)
    No longer supported (as of ParaView 5.4) and simply interpreted as vtkSMCompositeTreeDomain::ALL. This used to be specified in XML using the mode="non-leaves".

vtkSMCompositeTreeDomain also provides ability to set default value on the property. If mode is LEAVES, then the default value selected is the first non-null leaf node. If mode is ALL, the same behaviour for default value is possible by using default_mode="nonempty-leaf" in XML. e.g.

<CompositeTreeDomain name="tree" mode="all" default_mode="nonempty-leaf">
<RequiredProperties>
<Property function="Input" name="Input" />
</RequiredProperties>
</CompositeTreeDomain>

Definition at line 78 of file vtkSMCompositeTreeDomain.h.

Member Typedef Documentation

◆ Superclass

Definition at line 82 of file vtkSMCompositeTreeDomain.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
ALL 
LEAVES 
NON_LEAVES 
NONE 
AMR 

Definition at line 121 of file vtkSMCompositeTreeDomain.h.

◆ DefaultModes

Enumerator
DEFAULT 
NONEMPTY_LEAF 

Definition at line 130 of file vtkSMCompositeTreeDomain.h.

Constructor & Destructor Documentation

◆ vtkSMCompositeTreeDomain()

vtkSMCompositeTreeDomain::vtkSMCompositeTreeDomain ( )
protected

◆ ~vtkSMCompositeTreeDomain()

vtkSMCompositeTreeDomain::~vtkSMCompositeTreeDomain ( )
overrideprotected

Member Function Documentation

◆ New()

static vtkSMCompositeTreeDomain* vtkSMCompositeTreeDomain::New ( )
static

◆ GetClassName()

virtual const char* vtkSMCompositeTreeDomain::GetClassName ( )
virtual

Reimplemented from vtkSMDomain.

◆ IsTypeOf()

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

◆ IsA()

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

Reimplemented from vtkSMDomain.

◆ SafeDownCast()

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

◆ PrintSelf()

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

Reimplemented from vtkObject.

◆ Update()

void vtkSMCompositeTreeDomain::Update ( vtkSMProperty input)
overridevirtual

Called when the 'required-property' is modified.

The property must be a vtkSMInputProperty. This will obtain the composite data information for the input source and then determine the valid range for the flat-index.

Reimplemented from vtkSMDomain.

◆ GetInformation()

virtual vtkPVDataInformation* vtkSMCompositeTreeDomain::GetInformation ( )
virtual

Get the vtkPVDataInformation which provides the tree structure for the composite dataset.

◆ GetHierarchy()

vtkDataAssembly* vtkSMCompositeTreeDomain::GetHierarchy ( ) const

Returns vtkDataAssembly representing the hierarchy.

◆ IsInDomain()

int vtkSMCompositeTreeDomain::IsInDomain ( vtkSMProperty vtkNotUsedproperty)
inlineoverridevirtual

Is the (unchecked) value of the property in the domain? Overwritten by sub-classes.

Reimplemented from vtkSMDomain.

Definition at line 109 of file vtkSMCompositeTreeDomain.h.

◆ GetMode()

virtual int vtkSMCompositeTreeDomain::GetMode ( )
virtual

Mode indicates if the property is interested in all nodes, leaves only or non-leaves only.

Can be configured in XML using the "mode" attribute. Values can be "all", "leaves", "non-leaves". Default is all nodes.

◆ SetMode()

virtual void vtkSMCompositeTreeDomain::SetMode ( int  )
virtual

Mode indicates if the property is interested in all nodes, leaves only or non-leaves only.

Can be configured in XML using the "mode" attribute. Values can be "all", "leaves", "non-leaves". Default is all nodes.

◆ GetDefaultMode()

virtual int vtkSMCompositeTreeDomain::GetDefaultMode ( )
virtual

DefaultMode controls how the default value for the property is set by SetDefaultValues().

DEFAULT implies the default value is picked based on the default strategy for the selected Mode. NONEMPTY_LEAF indicates that the first non-empty leaf node is set as the default value, if possible.

◆ SetDefaultMode()

virtual void vtkSMCompositeTreeDomain::SetDefaultMode ( int  )
virtual

DefaultMode controls how the default value for the property is set by SetDefaultValues().

DEFAULT implies the default value is picked based on the default strategy for the selected Mode. NONEMPTY_LEAF indicates that the first non-empty leaf node is set as the default value, if possible.

◆ SetDefaultValues()

int vtkSMCompositeTreeDomain::SetDefaultValues ( vtkSMProperty ,
bool  use_unchecked_values 
)
override

A vtkSMProperty is often defined with a default value in the XML itself.

However, many times, the default value must be determined at run time. To facilitate this, domains can override this method to compute and set the default value for the property. Note that unlike the compile-time default values, the application must explicitly call this method to initialize the property. Returns 1 if the domain updated the property.

◆ ReadXMLAttributes()

int vtkSMCompositeTreeDomain::ReadXMLAttributes ( vtkSMProperty prop,
vtkPVXMLElement elem 
)
overrideprotectedvirtual

Set the appropriate ivars from the xml element.

Should be overwritten by subclass if adding ivars.

Reimplemented from vtkSMDomain.

◆ SetInformation()

void vtkSMCompositeTreeDomain::SetInformation ( vtkPVDataInformation )
protected

Member Data Documentation

◆ Information

vtkPVDataInformation* vtkSMCompositeTreeDomain::Information
protected

Definition at line 166 of file vtkSMCompositeTreeDomain.h.

◆ Mode

int vtkSMCompositeTreeDomain::Mode
protected

Definition at line 167 of file vtkSMCompositeTreeDomain.h.

◆ DefaultMode

int vtkSMCompositeTreeDomain::DefaultMode
protected

Definition at line 168 of file vtkSMCompositeTreeDomain.h.


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