OGS
VtkVisPointSetItem.h
Go to the documentation of this file.
1
15#pragma once
16
17// ** INCLUDES **
18#include "VtkVisPipelineItem.h"
19
20class vtkAlgorithm;
21class vtkDataSetAttributes;
22class vtkPointSet;
23class vtkProp3D;
24class vtkRenderer;
25class vtkTransformFilter;
27
30
40{
41
42public:
44 VtkVisPointSetItem(vtkAlgorithm* algorithm,
46 const QList<QVariant> data = QList<QVariant>());
47
50 const QList<QVariant> data = QList<QVariant>());
51
52 ~VtkVisPointSetItem() override;
53
55 QString GetActiveAttribute() const override;
56
58 void GetRangeForActiveAttribute(double range[2]) const;
59
62 void Initialize(vtkRenderer* renderer) override;
63
64 vtkAlgorithm* transformFilter() const override;
65
67 void SetActiveAttribute(const QString& name) override;
68
70 void setScale(double x, double y, double z) const override;
71
73 void setTranslation(double x, double y, double z) const override;
74
76 void setBackfaceCulling(bool enable) const override;
77
78protected:
80 vtkTransformFilter* _transformFilter;
82 std::string _activeArrayName;
83
85 int callVTKWriter(vtkAlgorithm* algorithm,
86 const std::string& filename) const override;
87
88 void SetScalarVisibility(bool on);
89
92
93private:
95 bool activeAttributeExists(vtkDataSetAttributes* data, std::string& name);
96
97};
Definition of the VtkVisPipelineItem class.
Simply wraps vtkDataSetMapper as a Qt object to enable slot connections.
Objects nodes for the TreeModel.
Definition TreeItem.h:28
TreeItem * parentItem() const
Definition TreeItem.cpp:115
Contains properties for the visualization of objects as VtkVisPipelineItems.
Is used to combine several filter in one VtkVisPipelineItem. You can use vtk filter and custom filter...
An item in the VtkVisPipeline containing a graphic object to be visualized.
vtkAlgorithm * algorithm() const
Returns the algorithm object.
QVariant data(int column) const override
VtkCompositeFilter * compositeFilter() const
Returns the composite filter.
An item in the VtkVisPipeline containing a point set object to be visualized.
void setTranslation(double x, double y, double z) const override
Translates the item in visualisation-space.
void GetRangeForActiveAttribute(double range[2]) const
Get the scalar range for the active attribute.
VtkVisPointSetItem(vtkAlgorithm *algorithm, TreeItem *parentItem, const QList< QVariant > data=QList< QVariant >())
Constructor for a source/filter object.
void SetActiveAttribute(const QString &name) override
Sets the selected attribute array for the visualisation of the data set.
bool activeAttributeExists(vtkDataSetAttributes *data, std::string &name)
Checks if the selected attribute actually exists for the data set.
int callVTKWriter(vtkAlgorithm *algorithm, const std::string &filename) const override
Selects the appropriate VTK-Writer object and writes the object to a file with the given name.
void SetScalarVisibility(bool on)
void setVtkProperties(VtkAlgorithmProperties *vtkProps)
Sets pre-set properties on vtkActor and on vtkMapper.
void setBackfaceCulling(bool enable) const override
Enables / disables backface culling.
QVtkDataSetMapper * _mapper
void setScale(double x, double y, double z) const override
Scales the data in visualisation-space.
QString GetActiveAttribute() const override
Gets the last selected attribute.
vtkTransformFilter * _transformFilter
vtkAlgorithm * transformFilter() const override
void Initialize(vtkRenderer *renderer) override
Initializes vtkMapper and vtkActor necessary for visualization of the item and sets the item's proper...