OGS
|
Is used to combine several filter in one VtkVisPipelineItem. You can use vtk filter and custom filter. To subclass this you have to implement the init() function. There you combine the filters. Make sure to set the members _inputDataObjectType, _outputDataObjectType and _outputAlgorithm. Make also sure to implement VtkAlgorithmProperties::SetUserProperty() and VtkAlgorithmProperties::SetUserVectorProperty().
Allocate vtk objects inside init() with vtkSmartPointer except for the last filter. This filter must also be set to _outputAlgorithm, e.g.
MyVtkFilter* lastFilter = MyVtkFilter::New(); ...(do something here) _outputAlgorithm = lastFilter;
Create user properties with ogsUserPropertyMacro
or ogsUserVecxPropertyMacro
and initialize these properties inside the constructor with this->Set[Property Name](value)
. See VtkCompositeThresholdFilter for an example.
Definition at line 41 of file VtkCompositeFilter.h.
#include <VtkCompositeFilter.h>
Public Member Functions | |
VtkCompositeFilter (vtkAlgorithm *inputAlgorithm) | |
Constructor. | |
~VtkCompositeFilter () override | |
Destructor. | |
int | GetInputDataObjectType () const |
int | GetOutputDataObjectType () const |
vtkAlgorithm * | GetOutputAlgorithm () const |
Public Member Functions inherited from VtkAlgorithmProperties | |
VtkAlgorithmProperties (QObject *parent=nullptr) | |
Constructor (sets default values) | |
~VtkAlgorithmProperties () override | |
vtkProperty * | GetProperties () const |
Returns the vtk properties. | |
vtkTexture * | GetTexture () |
Returns a texture (if one has been assigned). | |
void | SetTexture (vtkTexture *t) |
Sets a texture for the VtkVisPipelineItem. | |
vtkLookupTable * | GetLookupTable (const QString &array_name) |
Returns the colour lookup table (if one has been assigned). | |
void | RemoveLookupTable (const QString &array_name) |
Removes the lookup table for the given scalar. | |
void | SetLookUpTable (const QString &array_name, vtkLookupTable *lut) |
Sets a colour lookup table for the given scalar array of the VtkVisPipelineItem. | |
void | SetLookUpTable (const QString &array_name, const QString &filename) |
Loads a predefined color lookup table from a file for the specified scalar array. | |
bool | GetScalarVisibility () const |
Returns the scalar visibility. | |
void | SetScalarVisibility (bool on) |
Sets the scalar visibility. | |
QString | GetName () const |
Returns the name. This is set to the file path if it is a source algorithm. | |
void | SetName (QString name) |
Sets the name. | |
bool | IsRemovable () const |
Is this algorithm removable from the pipeline (view). | |
QMap< QString, QVariant > * | GetAlgorithmUserProperties () const |
Returns a map of user properties. | |
QMap< QString, QList< QVariant > > * | GetAlgorithmUserVectorProperties () const |
Returns a map of vector user properties. | |
virtual void | SetUserProperty (QString name, QVariant value) |
Sets a user property. This should be implemented by subclasses. | |
QVariant | GetUserProperty (QString name) const |
Returns the value of a user property. | |
virtual void | SetUserVectorProperty (QString name, QList< QVariant > values) |
Sets a vector user property. This should be implemented by subclasses. | |
QList< QVariant > | GetUserVectorProperty (QString name) const |
Returns a list of values of a vector user property. | |
void | SetActiveAttribute (QString name) |
Set the active attribute. | |
QString | GetActiveAttribute () const |
Returns the desired active attribute. | |
Protected Member Functions | |
double | GetInitialRadius () const |
Calculates a 1/200th of the largest extension of the bounding box (this is used as default radius for various filters) | |
virtual void | init ()=0 |
Protected Attributes | |
int | _inputDataObjectType |
int | _outputDataObjectType |
vtkAlgorithm * | _inputAlgorithm |
vtkAlgorithm * | _outputAlgorithm |
Protected Attributes inherited from VtkAlgorithmProperties | |
vtkProperty * | _property |
vtkTexture * | _texture |
bool | _scalarVisibility |
std::map< QString, vtkLookupTable * > | _lut |
QString | _name |
QString | _activeAttributeName |
bool | _removable |
QMap< QString, QVariant > * | _algorithmUserProperties |
QMap< QString, QList< QVariant > > * | _algorithmUserVectorProperties |
Additional Inherited Members | |
Signals inherited from VtkAlgorithmProperties | |
void | ScalarVisibilityChanged (bool on) |
|
explicit |
Constructor.
inputAlgorithm | The algorithm to attach this filter to. |
Definition at line 25 of file VtkCompositeFilter.cpp.
|
override |
|
protected |
Calculates a 1/200th of the largest extension of the bounding box (this is used as default radius for various filters)
Definition at line 38 of file VtkCompositeFilter.cpp.
References _inputAlgorithm.
Referenced by VtkCompositeGeoObjectFilter::init(), VtkCompositeLineToTubeFilter::init(), VtkCompositeNodeSelectionFilter::init(), and VtkCompositePointToGlyphFilter::init().
|
inline |
Definition at line 60 of file VtkCompositeFilter.h.
References _inputDataObjectType.
|
inline |
Definition at line 66 of file VtkCompositeFilter.h.
References _outputAlgorithm.
Referenced by VtkVisPipelineItem::VtkVisPipelineItem(), and VtkCompositeGeoObjectFilter::init().
|
inline |
Definition at line 63 of file VtkCompositeFilter.h.
References _outputDataObjectType.
|
protectedpure virtual |
Implemented in VtkCompositeColorByHeightFilter, VtkCompositeColormapToImageFilter, VtkCompositeContourFilter, VtkCompositeElementSelectionFilter, VtkCompositeGeoObjectFilter, VtkCompositeImageToCylindersFilter, VtkCompositeImageToPointCloudFilter, VtkCompositeImageToSurfacePointsFilter, VtkCompositeLineToTubeFilter, VtkCompositeNodeSelectionFilter, VtkCompositePointToGlyphFilter, VtkCompositeTextureOnSurfaceFilter, and VtkCompositeThresholdFilter.
Referenced by VtkCompositeGeoObjectFilter::VtkCompositeGeoObjectFilter().
|
protected |
Definition at line 77 of file VtkCompositeFilter.h.
Referenced by GetInitialRadius(), VtkCompositeColorByHeightFilter::init(), VtkCompositeColormapToImageFilter::init(), VtkCompositeContourFilter::init(), VtkCompositeElementSelectionFilter::init(), VtkCompositeGeoObjectFilter::init(), VtkCompositeImageToCylindersFilter::init(), VtkCompositeImageToPointCloudFilter::init(), VtkCompositeImageToSurfacePointsFilter::init(), VtkCompositeLineToTubeFilter::init(), VtkCompositePointToGlyphFilter::init(), VtkCompositeTextureOnSurfaceFilter::init(), VtkCompositeThresholdFilter::init(), and VtkCompositeNodeSelectionFilter::setSelectionArray().
|
protected |
See vtkSetGet.h for the defines
Definition at line 74 of file VtkCompositeFilter.h.
Referenced by GetInputDataObjectType(), VtkCompositeColorByHeightFilter::init(), VtkCompositeColormapToImageFilter::init(), VtkCompositeContourFilter::init(), VtkCompositeElementSelectionFilter::init(), VtkCompositeGeoObjectFilter::init(), VtkCompositeImageToCylindersFilter::init(), VtkCompositeImageToPointCloudFilter::init(), VtkCompositeImageToSurfacePointsFilter::init(), VtkCompositeLineToTubeFilter::init(), VtkCompositeNodeSelectionFilter::init(), VtkCompositePointToGlyphFilter::init(), VtkCompositeTextureOnSurfaceFilter::init(), and VtkCompositeThresholdFilter::init().
|
protected |
Definition at line 78 of file VtkCompositeFilter.h.
Referenced by ~VtkCompositeFilter(), GetOutputAlgorithm(), VtkCompositeColorByHeightFilter::init(), VtkCompositeColormapToImageFilter::init(), VtkCompositeContourFilter::init(), VtkCompositeElementSelectionFilter::init(), VtkCompositeGeoObjectFilter::init(), VtkCompositeImageToCylindersFilter::init(), VtkCompositeImageToPointCloudFilter::init(), VtkCompositeImageToSurfacePointsFilter::init(), VtkCompositeLineToTubeFilter::init(), VtkCompositeNodeSelectionFilter::init(), VtkCompositePointToGlyphFilter::init(), VtkCompositeTextureOnSurfaceFilter::init(), VtkCompositeThresholdFilter::init(), VtkCompositeColormapToImageFilter::SetUserProperty(), VtkCompositeContourFilter::SetUserProperty(), VtkCompositeImageToCylindersFilter::SetUserProperty(), VtkCompositeImageToPointCloudFilter::SetUserProperty(), VtkCompositeImageToSurfacePointsFilter::SetUserProperty(), VtkCompositeLineToTubeFilter::SetUserProperty(), VtkCompositePointToGlyphFilter::SetUserProperty(), VtkCompositeThresholdFilter::SetUserProperty(), VtkCompositeColormapToImageFilter::SetUserVectorProperty(), VtkCompositeContourFilter::SetUserVectorProperty(), VtkCompositeElementSelectionFilter::SetUserVectorProperty(), VtkCompositeImageToPointCloudFilter::SetUserVectorProperty(), and VtkCompositeThresholdFilter::SetUserVectorProperty().
|
protected |
Definition at line 75 of file VtkCompositeFilter.h.
Referenced by GetOutputDataObjectType(), VtkCompositeColorByHeightFilter::init(), VtkCompositeColormapToImageFilter::init(), VtkCompositeContourFilter::init(), VtkCompositeElementSelectionFilter::init(), VtkCompositeGeoObjectFilter::init(), VtkCompositeImageToCylindersFilter::init(), VtkCompositeImageToPointCloudFilter::init(), VtkCompositeImageToSurfacePointsFilter::init(), VtkCompositeLineToTubeFilter::init(), VtkCompositeNodeSelectionFilter::init(), VtkCompositePointToGlyphFilter::init(), VtkCompositeTextureOnSurfaceFilter::init(), and VtkCompositeThresholdFilter::init().