OGS
|
VTK filter object for colouring vtkPolyData objects based on z-coordinates.
This filter class is basically a container for a ColorLookupTable. In fact, you can get the underlying ColorLookupTable using the method GetColorLookupTable(). Using this method allows the user to set a number of properties on that lookup table such as interpolation method, the range of values over which the lookup table is calculated and so on. If no range boundaries are explicitly set, the minimum and maximum height value will be calculated from the data and set as minimum and maximum value for the lookup table. ColorLookupTable must be deleted manually.
Definition at line 37 of file VtkColorByHeightFilter.h.
#include <VtkColorByHeightFilter.h>
Public Member Functions | |
vtkTypeMacro (VtkColorByHeightFilter, vtkPolyDataAlgorithm) | |
void | PrintSelf (ostream &os, vtkIndent indent) override |
Prints the mesh data to an output stream. | |
vtkGetObjectMacro (ColorLookupTable, VtkColorLookupTable) | |
Returns the underlying colour look up table object. | |
vtkMTimeType | GetMTime () override |
This filter gets updated when the color look-up table was modified. | |
void | SetUserProperty (QString name, QVariant value) override |
Sets user properties. | |
void | SetTableRange (double min, double max) |
Sets the boundaries for the color look-up table. | |
void | SetTableRangeScaling (double scale) |
Sets the scaling of the color look-up table boundaries. This is used in VtkVisTabWidget when a parent filter is scaled. | |
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. | |
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. | |
Static Public Member Functions | |
static VtkColorByHeightFilter * | New () |
Create new objects with New() because of VTKs object reference counting. | |
Protected Member Functions | |
VtkColorByHeightFilter () | |
~VtkColorByHeightFilter () override | |
int | RequestData (vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override |
The filter logic. | |
VtkColorLookupTable * | BuildColorTable () |
Calculates the color lookup table based on set parameters. | |
Protected Attributes | |
VtkColorLookupTable * | ColorLookupTable |
double | _tableRange [2] |
double | _tableRangeScaling {1.0} |
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) |
|
protected |
Definition at line 34 of file VtkColorByHeightFilter.cpp.
|
overrideprotecteddefault |
|
protected |
Calculates the color lookup table based on set parameters.
|
override |
This filter gets updated when the color look-up table was modified.
Definition at line 53 of file VtkColorByHeightFilter.cpp.
References ColorLookupTable.
|
static |
Create new objects with New() because of VTKs object reference counting.
Referenced by VtkCompositeColorByHeightFilter::init().
|
override |
Prints the mesh data to an output stream.
Definition at line 41 of file VtkColorByHeightFilter.cpp.
References ColorLookupTable, and VtkColorLookupTable::getInterpolationType().
|
overrideprotected |
The filter logic.
Definition at line 63 of file VtkColorByHeightFilter.cpp.
void VtkColorByHeightFilter::SetTableRange | ( | double | min, |
double | max ) |
Sets the boundaries for the color look-up table.
Definition at line 98 of file VtkColorByHeightFilter.cpp.
References _tableRange, ColorLookupTable, and ERR().
void VtkColorByHeightFilter::SetTableRangeScaling | ( | double | scale | ) |
Sets the scaling of the color look-up table boundaries. This is used in VtkVisTabWidget when a parent filter is scaled.
Definition at line 113 of file VtkColorByHeightFilter.cpp.
References _tableRange, _tableRangeScaling, and ColorLookupTable.
|
inlineoverridevirtual |
Sets user properties.
Reimplemented from VtkAlgorithmProperties.
Definition at line 55 of file VtkColorByHeightFilter.h.
VtkColorByHeightFilter::vtkGetObjectMacro | ( | ColorLookupTable | , |
VtkColorLookupTable | ) |
Returns the underlying colour look up table object.
VtkColorByHeightFilter::vtkTypeMacro | ( | VtkColorByHeightFilter | , |
vtkPolyDataAlgorithm | ) |
|
protected |
Definition at line 82 of file VtkColorByHeightFilter.h.
Referenced by SetTableRange(), and SetTableRangeScaling().
|
protected |
Definition at line 83 of file VtkColorByHeightFilter.h.
Referenced by SetTableRangeScaling().
|
protected |
Definition at line 80 of file VtkColorByHeightFilter.h.
Referenced by GetMTime(), PrintSelf(), SetTableRange(), and SetTableRangeScaling().