18 #include <vtkDataSetSurfaceFilter.h>
19 #include <vtkSmartPointer.h>
20 #include <vtkUnstructuredGrid.h>
26 vtkAlgorithm* inputAlgorithm)
37 vtkSmartPointer<vtkDataSetSurfaceFilter> surfaceFilter;
40 if (
dynamic_cast<vtkUnstructuredGrid*
>(
43 surfaceFilter = vtkSmartPointer<vtkDataSetSurfaceFilter>::New();
45 heightFilter->SetInputConnection(surfaceFilter->GetOutputPort());
67 ColorLookupTable->SetTableRange(-35, 2000);
68 ColorLookupTable->
Build();
72 heightFilter->Update();
Definition of the VtkColorByHeightFilter class.
Definition of the VtkColorLookupTable class.
Definition of the VtkCompositeColorByHeightFilter class.
QString GetActiveAttribute() const
Returns the desired active attribute.
void SetLookUpTable(const QString &array_name, vtkLookupTable *lut)
Sets a colour lookup table for the given scalar array of the VtkVisPipelineItem.
QString _activeAttributeName
VTK filter object for colouring vtkPolyData objects based on z-coordinates.
static VtkColorByHeightFilter * New()
Create new objects with New() because of VTKs object reference counting.
Calculates and stores a colour lookup table.
void setColor(double pos, DataHolderLib::Color const &color)
void Build() override
Builds the colour table based on the previously set parameters. This method should only be called aft...
void setInterpolationType(DataHolderLib::LUTType type)
Sets the type of interpolation.
VtkCompositeColorByHeightFilter(vtkAlgorithm *inputAlgorithm)
void SetUserProperty(QString name, QVariant value) override
Sets a user property. This should be implemented by subclasses.
Is used to combine several filter in one VtkVisPipelineItem. You can use vtk filter and custom filter...
vtkAlgorithm * _outputAlgorithm
int _outputDataObjectType
vtkAlgorithm * _inputAlgorithm
std::array< unsigned char, 4 > Color