OGS
VtkColorByHeightFilter.h
Go to the documentation of this file.
1 
15 #pragma once
16 
17 // ** INCLUDES **
18 #include "VtkAlgorithmProperties.h"
19 
20 #include <vtkPolyDataAlgorithm.h>
21 #include <vtkType.h>
22 
24 
37 class VtkColorByHeightFilter : public vtkPolyDataAlgorithm, public VtkAlgorithmProperties
38 {
39 public:
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 
68 protected:
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.
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
VtkColorLookupTable * BuildColorTable()
Calculates the color lookup table based on set parameters.
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.
void SetUserProperty(QString name, QVariant value) override
Sets user properties.
VtkColorLookupTable * ColorLookupTable
static VtkColorByHeightFilter * New()
Create new objects with New() because of VTKs object reference counting.
int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
The filter logic.
Calculates and stores a colour lookup table.
void scale(PETScVector &x, double const a)
Definition: LinAlg.cpp:44