OGS
VtkColorByHeightFilter.h
Go to the documentation of this file.
1
15#pragma once
16
17// ** INCLUDES **
19
20#include <vtkPolyDataAlgorithm.h>
21#include <vtkType.h>
22
24
37class VtkColorByHeightFilter : public vtkPolyDataAlgorithm, public VtkAlgorithmProperties
38{
39public:
42
43 vtkTypeMacro(VtkColorByHeightFilter, vtkPolyDataAlgorithm);
44
46 void PrintSelf(ostream& os, vtkIndent indent) override;
47
50
52 vtkMTimeType GetMTime() override;
53
55 void SetUserProperty(QString name, QVariant value) override
56 {
57 Q_UNUSED(name);
58 Q_UNUSED(value);
59 }
60
62 void SetTableRange(double min, double max);
63
66 void SetTableRangeScaling(double scale);
67
68protected:
71
73 int RequestData(vtkInformation* request,
74 vtkInformationVector** inputVector,
75 vtkInformationVector* outputVector) override;
76
79
81
82 double _tableRange[2];
83 double _tableRangeScaling{1.0};
84};
Definition of the VtkAlgorithmProperties class.
Contains properties for the visualization of objects as VtkVisPipelineItems.
VTK filter object for colouring vtkPolyData objects based on z-coordinates.
VtkColorLookupTable * BuildColorTable()
Calculates the color lookup table based on set parameters.
void SetTableRangeScaling(double scale)
Sets the scaling of the color look-up table boundaries. This is used in VtkVisTabWidget when a parent...
vtkGetObjectMacro(ColorLookupTable, VtkColorLookupTable)
Returns the underlying colour look up table object.
~VtkColorByHeightFilter() override
vtkMTimeType GetMTime() override
This filter gets updated when the color look-up table was modified.
void PrintSelf(ostream &os, vtkIndent indent) override
Prints the mesh data to an output stream.
vtkTypeMacro(VtkColorByHeightFilter, vtkPolyDataAlgorithm)
void SetTableRange(double min, double max)
Sets the boundaries for the color look-up table.
static VtkColorByHeightFilter * New()
Create new objects with New() because of VTKs object reference counting.
void SetUserProperty(QString name, QVariant value) override
Sets user properties.
VtkColorLookupTable * ColorLookupTable
int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
The filter logic.
Calculates and stores a colour lookup table.