OGS
|
An item in the VtkVisPipeline containing a point set object to be visualized.
Any VTK point set object (i.e. vtkUnstructuredGrid- and vtkPolyDataAlgorithm-objects) are represented by a VtkVisPointSetItem to be assigned a mapper, an actor and its visualization properties (colour, scalar values, etc.).
Definition at line 39 of file VtkVisPointSetItem.h.
#include <VtkVisPointSetItem.h>
Public Member Functions | |
VtkVisPointSetItem (vtkAlgorithm *algorithm, TreeItem *parentItem, const QList< QVariant > data=QList< QVariant >()) | |
Constructor for a source/filter object. | |
VtkVisPointSetItem (VtkCompositeFilter *compositeFilter, TreeItem *parentItem, const QList< QVariant > data=QList< QVariant >()) | |
Constructor for composite filter. | |
~VtkVisPointSetItem () override | |
QString | GetActiveAttribute () const override |
Gets the last selected attribute. | |
void | GetRangeForActiveAttribute (double range[2]) const |
Get the scalar range for the active attribute. | |
void | Initialize (vtkRenderer *renderer) override |
Initializes vtkMapper and vtkActor necessary for visualization of the item and sets the item's properties. | |
vtkAlgorithm * | transformFilter () const override |
void | SetActiveAttribute (const QString &name) override |
Sets the selected attribute array for the visualisation of the data set. | |
void | setScale (double x, double y, double z) const override |
Scales the data in visualisation-space. | |
void | setTranslation (double x, double y, double z) const override |
Translates the item in visualisation-space. | |
void | setBackfaceCulling (bool enable) const override |
Enables / disables backface culling. | |
Public Member Functions inherited from VtkVisPipelineItem | |
VtkVisPipelineItem (vtkAlgorithm *algorithm, TreeItem *parentItem, const QList< QVariant > data=QList< QVariant >()) | |
Constructor for a source/filter object. | |
VtkVisPipelineItem (VtkCompositeFilter *compositeFilter, TreeItem *parentItem, const QList< QVariant > data=QList< QVariant >()) | |
Constructor for composite filter. | |
~VtkVisPipelineItem () override | |
VtkVisPipelineItem * | child (int row) const |
Returns a VtkVisPipelineItem. | |
QVariant | data (int column) const override |
bool | setData (int column, const QVariant &value) override |
vtkAlgorithm * | algorithm () const |
Returns the algorithm object. | |
vtkProp3D * | actor () const |
Returns the actor as vtkProp3D. | |
VtkCompositeFilter * | compositeFilter () const |
Returns the composite filter. | |
bool | isVisible () const |
Returns if the VTK object is visible in the visualization. | |
void | setVisible (bool visible) |
Sets the visibility of the VTK object in the visualization. | |
int | writeToFile (const std::string &filename) const |
Writes this algorithm's vtkDataSet (i.e. vtkPolyData or vtkUnstructuredGrid) to a vtk-file. | |
void | setScaleOnChildren (double x, double y, double z) const |
Sets the geometry and date scaling recursively on all children of this item. | |
void | setBackfaceCullingOnChildren (bool enable) const |
Enables / disables backface culling on all children. | |
QStringList | getScalarArrayNames () const |
Returns a list of array names prefixed with P- or C- for point and cell data. | |
VtkAlgorithmProperties * | getVtkProperties () const |
Returns the VtkAlgorithmProperties. | |
Public Member Functions inherited from TreeItem | |
TreeItem (QList< QVariant > data, TreeItem *parent) | |
virtual | ~TreeItem () |
void | appendChild (TreeItem *item) |
TreeItem * | child (int row) const |
virtual int | childCount () const |
virtual int | columnCount () const |
int | row () const |
TreeItem * | parentItem () const |
bool | removeChildren (int position, int count) |
Protected Member Functions | |
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. | |
Protected Member Functions inherited from VtkVisPipelineItem |
Protected Attributes | |
QVtkDataSetMapper * | _mapper |
vtkTransformFilter * | _transformFilter |
bool | _onPointData |
std::string | _activeArrayName |
Protected Attributes inherited from VtkVisPipelineItem | |
vtkProp3D * | _actor |
vtkAlgorithm * | _algorithm |
vtkRenderer * | _renderer |
VtkCompositeFilter * | _compositeFilter |
VtkAlgorithmProperties * | _vtkProps |
The active VtkAlgorithmProperties. From algorithm, compositeFilter, or copied from parent. | |
Private Member Functions | |
bool | activeAttributeExists (vtkDataSetAttributes *data, std::string &name) |
Checks if the selected attribute actually exists for the data set. | |
VtkVisPointSetItem::VtkVisPointSetItem | ( | vtkAlgorithm * | algorithm, |
TreeItem * | parentItem, | ||
const QList< QVariant > | data = QList<QVariant>() ) |
Constructor for a source/filter object.
Definition at line 54 of file VtkVisPointSetItem.cpp.
References TreeItem::parentItem().
VtkVisPointSetItem::VtkVisPointSetItem | ( | VtkCompositeFilter * | compositeFilter, |
TreeItem * | parentItem, | ||
const QList< QVariant > | data = QList<QVariant>() ) |
Constructor for composite filter.
Definition at line 85 of file VtkVisPointSetItem.cpp.
|
override |
Definition at line 96 of file VtkVisPointSetItem.cpp.
References _mapper, and _transformFilter.
|
private |
Checks if the selected attribute actually exists for the data set.
Definition at line 368 of file VtkVisPointSetItem.cpp.
References VtkVisPipelineItem::data().
|
overrideprotectedvirtual |
Selects the appropriate VTK-Writer object and writes the object to a file with the given name.
Reimplemented from VtkVisPipelineItem.
Definition at line 250 of file VtkVisPointSetItem.cpp.
References VtkVisPipelineItem::algorithm(), BaseLib::getFileExtension(), and WARN().
|
overridevirtual |
Gets the last selected attribute.
Reimplemented from VtkVisPipelineItem.
Definition at line 101 of file VtkVisPointSetItem.cpp.
References VtkVisPipelineItem::_vtkProps, and VtkAlgorithmProperties::GetActiveAttribute().
void VtkVisPointSetItem::GetRangeForActiveAttribute | ( | double | range[2] | ) | const |
Get the scalar range for the active attribute.
Definition at line 430 of file VtkVisPointSetItem.cpp.
References _activeArrayName, VtkVisPipelineItem::_algorithm, and _onPointData.
Referenced by Initialize(), and SetActiveAttribute().
|
overridevirtual |
Initializes vtkMapper and vtkActor necessary for visualization of the item and sets the item's properties.
Implements VtkVisPipelineItem.
Definition at line 106 of file VtkVisPointSetItem.cpp.
References VtkVisPipelineItem::_actor, VtkVisPipelineItem::_algorithm, VtkVisPipelineItem::_compositeFilter, _mapper, VtkVisPipelineItem::_renderer, _transformFilter, VtkVisPipelineItem::_vtkProps, VtkAlgorithmProperties::GetActiveAttribute(), VtkAlgorithmProperties::GetProperties(), GetRangeForActiveAttribute(), VtkVisPipelineItem::getScalarArrayNames(), VtkAlgorithmProperties::GetScalarVisibility(), VtkAlgorithmProperties::GetTexture(), VtkVisPipelineItem::getVtkProperties(), QVtkDataSetMapper::New(), TreeItem::parentItem(), SetActiveAttribute(), setBackfaceCulling(), and setVtkProperties().
|
overridevirtual |
Sets the selected attribute array for the visualisation of the data set.
Reimplemented from VtkVisPipelineItem.
Definition at line 286 of file VtkVisPointSetItem.cpp.
References _activeArrayName, VtkVisPipelineItem::_algorithm, _mapper, _onPointData, VtkVisPipelineItem::_vtkProps, VtkAlgorithmProperties::GetLookupTable(), GetRangeForActiveAttribute(), VtkAlgorithmProperties::SetActiveAttribute(), and VtkAlgorithmProperties::SetLookUpTable().
Referenced by Initialize().
|
overridevirtual |
Enables / disables backface culling.
Reimplemented from VtkVisPipelineItem.
Definition at line 423 of file VtkVisPointSetItem.cpp.
References VtkVisPipelineItem::_actor.
Referenced by Initialize().
|
protected |
Definition at line 217 of file VtkVisPointSetItem.cpp.
References _mapper, and QVtkDataSetMapper::SetScalarVisibility().
Referenced by setVtkProperties().
|
overridevirtual |
Scales the data in visualisation-space.
Reimplemented from VtkVisPipelineItem.
Definition at line 390 of file VtkVisPointSetItem.cpp.
References _transformFilter, and transformFilter().
|
overridevirtual |
Translates the item in visualisation-space.
Reimplemented from VtkVisPipelineItem.
Definition at line 404 of file VtkVisPointSetItem.cpp.
References _transformFilter, and transformFilter().
|
protected |
Sets pre-set properties on vtkActor and on vtkMapper.
Definition at line 222 of file VtkVisPointSetItem.cpp.
References VtkVisPipelineItem::_actor, _mapper, VtkVisPipelineItem::actor(), VtkAlgorithmProperties::GetProperties(), VtkAlgorithmProperties::GetScalarVisibility(), VtkAlgorithmProperties::GetTexture(), VtkAlgorithmProperties::SetScalarVisibility(), and SetScalarVisibility().
Referenced by Initialize().
|
overridevirtual |
Returns the transform filter for the object. This function needs to be implemented by derived classes.
Implements VtkVisPipelineItem.
Definition at line 418 of file VtkVisPointSetItem.cpp.
References _transformFilter.
Referenced by setScale(), and setTranslation().
|
protected |
Definition at line 82 of file VtkVisPointSetItem.h.
Referenced by GetRangeForActiveAttribute(), and SetActiveAttribute().
|
protected |
Definition at line 79 of file VtkVisPointSetItem.h.
Referenced by ~VtkVisPointSetItem(), Initialize(), SetActiveAttribute(), SetScalarVisibility(), and setVtkProperties().
|
protected |
Definition at line 81 of file VtkVisPointSetItem.h.
Referenced by GetRangeForActiveAttribute(), and SetActiveAttribute().
|
protected |
Definition at line 80 of file VtkVisPointSetItem.h.
Referenced by ~VtkVisPointSetItem(), Initialize(), setScale(), setTranslation(), and transformFilter().