OGS
|
An item in the VtkVisPipeline containing a graphic object to be visualized.
Any VTK-object (source-items, filter-items, etc.) need to be put into a VtkPipelineItem to be assigned a mapper, an actor and its visualization properties (colour, etc.).
Definition at line 42 of file VtkVisPipelineItem.h.
#include <VtkVisPipelineItem.h>
Public Member Functions | |
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. | |
virtual void | Initialize (vtkRenderer *renderer)=0 |
Initializes vtkMapper and vtkActor necessary for visualization of the item and sets the item's properties. | |
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. | |
virtual QString | GetActiveAttribute () const |
virtual void | SetActiveAttribute (const QString &str) |
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. | |
virtual void | setScale (double x, double y, double z) const |
Scales the data in visualisation-space. This function is empty and needs to be implemented by derived classes. | |
void | setScaleOnChildren (double x, double y, double z) const |
Sets the geometry and date scaling recursively on all children of this item. | |
virtual void | setTranslation (double x, double y, double z) const |
Translates the item in visualisation-space. This function is empty and needs to be implemented by derived classes. | |
virtual vtkAlgorithm * | transformFilter () const =0 |
virtual void | setBackfaceCulling (bool enable) const |
Enables / disables backface culling. | |
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 | |
virtual int | callVTKWriter (vtkAlgorithm *algorithm, const std::string &filename) const |
Protected Attributes | |
vtkProp3D * | _actor |
vtkAlgorithm * | _algorithm |
vtkRenderer * | _renderer |
VtkCompositeFilter * | _compositeFilter |
VtkAlgorithmProperties * | _vtkProps |
The active VtkAlgorithmProperties. From algorithm, compositeFilter, or copied from parent. | |
VtkVisPipelineItem::VtkVisPipelineItem | ( | vtkAlgorithm * | algorithm, |
TreeItem * | parentItem, | ||
const QList< QVariant > | data = QList<QVariant>() ) |
Constructor for a source/filter object.
Definition at line 38 of file VtkVisPipelineItem.cpp.
References _algorithm, and TreeItem::parentItem().
VtkVisPipelineItem::VtkVisPipelineItem | ( | VtkCompositeFilter * | compositeFilter, |
TreeItem * | parentItem, | ||
const QList< QVariant > | data = QList<QVariant>() ) |
Constructor for composite filter.
Definition at line 56 of file VtkVisPipelineItem.cpp.
References _algorithm, _compositeFilter, and VtkCompositeFilter::GetOutputAlgorithm().
|
override |
Definition at line 68 of file VtkVisPipelineItem.cpp.
References _actor, _compositeFilter, and _renderer.
vtkProp3D * VtkVisPipelineItem::actor | ( | ) | const |
Returns the actor as vtkProp3D.
Definition at line 136 of file VtkVisPipelineItem.cpp.
References _actor.
Referenced by VtkVisPipeline::addPipelineItem(), VtkVisTabWidget::on_diffuseColorPickerButton_colorPicked(), VtkVisTabWidget::on_edgeColorPickerButton_colorPicked(), VtkVisTabWidget::on_opacitySlider_sliderMoved(), VtkVisTabWidget::on_visibleEdgesCheckBox_stateChanged(), VtkVisTabWidget::setActiveItem(), and VtkVisPointSetItem::setVtkProperties().
|
inline |
Returns the algorithm object.
Definition at line 69 of file VtkVisPipelineItem.h.
References _algorithm.
Referenced by VtkAddFilterDialog::VtkAddFilterDialog(), VtkVisPipeline::addPipelineItem(), VtkVisImageItem::callVTKWriter(), callVTKWriter(), VtkVisPointSetItem::callVTKWriter(), VtkVisPipelineView::contextMenuEvent(), VtkVisPipelineView::convertVTKToOGSMesh(), getScalarArrayNames(), VtkVisPipeline::removeSourceItem(), VtkVisPipeline::removeSourceItem(), VtkVisPipeline::removeSourceItem(), VtkVisPipelineView::showImageToMeshConversionDialog(), and writeToFile().
|
protectedvirtual |
Selects the appropriate VTK-Writer object and writes the object to a file with the given name. This function is empty and needs to be implemented by derived classes.
Reimplemented in VtkVisImageItem, and VtkVisPointSetItem.
Definition at line 127 of file VtkVisPipelineItem.cpp.
References algorithm().
Referenced by writeToFile().
VtkVisPipelineItem * VtkVisPipelineItem::child | ( | int | row | ) | const |
Returns a VtkVisPipelineItem.
Definition at line 75 of file VtkVisPipelineItem.cpp.
References TreeItem::child(), and TreeItem::row().
Referenced by VtkVisTabWidget::on_scaleZ_textChanged(), setBackfaceCullingOnChildren(), and setScaleOnChildren().
|
inline |
Returns the composite filter.
Definition at line 81 of file VtkVisPipelineItem.h.
References _compositeFilter.
Referenced by VtkVisTabWidget::buildProportiesDialog(), and VtkVisTabWidget::on_scaleZ_textChanged().
|
overridevirtual |
Returns the data from all the columns.
Reimplemented from TreeItem.
Definition at line 86 of file VtkVisPipelineItem.cpp.
References TreeItem::data(), and isVisible().
Referenced by VtkVisPointSetItem::activeAttributeExists(), VtkVisPipelineView::convertVTKToOGSMesh(), and VtkVisImageItem::writeAsRaster().
|
inlinevirtual |
Reimplemented in VtkVisPointSetItem.
Definition at line 75 of file VtkVisPipelineItem.h.
Referenced by VtkVisPipelineView::addColorTable(), VtkVisTabWidget::buildScalarArrayComboBox(), and VtkVisTabWidget::setActiveItem().
QStringList VtkVisPipelineItem::getScalarArrayNames | ( | ) | const |
Returns a list of array names prefixed with P- or C- for point and cell data.
Definition at line 178 of file VtkVisPipelineItem.cpp.
References algorithm().
Referenced by VtkVisTabWidget::buildScalarArrayComboBox(), and VtkVisPointSetItem::Initialize().
|
inline |
Returns the VtkAlgorithmProperties.
Definition at line 126 of file VtkVisPipelineItem.h.
References _vtkProps.
Referenced by VtkVisTabWidget::buildProportiesDialog(), VtkVisPipelineView::contextMenuEvent(), VtkVisPointSetItem::Initialize(), and VtkVisTabWidget::on_arrayResetPushButton_clicked().
|
pure virtual |
Initializes vtkMapper and vtkActor necessary for visualization of the item and sets the item's properties.
Implemented in VtkVisImageItem, and VtkVisPointSetItem.
Referenced by VtkVisPipeline::addPipelineItem().
bool VtkVisPipelineItem::isVisible | ( | ) | const |
Returns if the VTK object is visible in the visualization.
Definition at line 106 of file VtkVisPipelineItem.cpp.
References _actor.
Referenced by data().
|
inlinevirtual |
Reimplemented in VtkVisPointSetItem.
Definition at line 78 of file VtkVisPipelineItem.h.
Referenced by VtkVisPipelineView::addColorTable(), VtkVisTabWidget::buildScalarArrayComboBox(), VtkVisImageItem::Initialize(), VtkVisTabWidget::on_arrayResetPushButton_clicked(), and VtkVisTabWidget::SetActiveAttributeOnItem().
|
virtual |
Enables / disables backface culling.
Reimplemented in VtkVisPointSetItem.
Definition at line 162 of file VtkVisPipelineItem.cpp.
Referenced by setBackfaceCullingOnChildren(), and VtkVisPipeline::setGlobalBackfaceCulling().
void VtkVisPipelineItem::setBackfaceCullingOnChildren | ( | bool | enable | ) | const |
Enables / disables backface culling on all children.
Definition at line 168 of file VtkVisPipelineItem.cpp.
References child(), TreeItem::childCount(), setBackfaceCulling(), and setBackfaceCullingOnChildren().
Referenced by setBackfaceCullingOnChildren().
|
overridevirtual |
Sets the data at a given column.
Reimplemented from TreeItem.
Definition at line 96 of file VtkVisPipelineItem.cpp.
References TreeItem::setData(), and setVisible().
|
virtual |
Scales the data in visualisation-space. This function is empty and needs to be implemented by derived classes.
Reimplemented in VtkVisPointSetItem.
Definition at line 141 of file VtkVisPipelineItem.cpp.
Referenced by VtkVisPipeline::addPipelineItem(), VtkVisTabWidget::on_scaleZ_textChanged(), VtkVisPipeline::setGlobalSuperelevation(), and setScaleOnChildren().
void VtkVisPipelineItem::setScaleOnChildren | ( | double | x, |
double | y, | ||
double | z ) const |
Sets the geometry and date scaling recursively on all children of this item.
Definition at line 153 of file VtkVisPipelineItem.cpp.
References child(), TreeItem::childCount(), and setScale().
|
virtual |
Translates the item in visualisation-space. This function is empty and needs to be implemented by derived classes.
Reimplemented in VtkVisImageItem, and VtkVisPointSetItem.
Definition at line 147 of file VtkVisPipelineItem.cpp.
Referenced by VtkVisTabWidget::translateItem().
void VtkVisPipelineItem::setVisible | ( | bool | visible | ) |
|
pure virtual |
Returns the transform filter for the object. This function needs to be implemented by derived classes.
Implemented in VtkVisImageItem, and VtkVisPointSetItem.
Referenced by VtkVisTabWidget::setActiveItem().
int VtkVisPipelineItem::writeToFile | ( | const std::string & | filename | ) | const |
Writes this algorithm's vtkDataSet (i.e. vtkPolyData or vtkUnstructuredGrid) to a vtk-file.
Definition at line 118 of file VtkVisPipelineItem.cpp.
References algorithm(), and callVTKWriter().
Referenced by MainWindow::on_actionExportVTK_triggered().
|
protected |
Definition at line 129 of file VtkVisPipelineItem.h.
Referenced by ~VtkVisPipelineItem(), actor(), VtkVisImageItem::Initialize(), VtkVisPointSetItem::Initialize(), isVisible(), VtkVisPointSetItem::setBackfaceCulling(), setVisible(), and VtkVisPointSetItem::setVtkProperties().
|
protected |
Definition at line 130 of file VtkVisPipelineItem.h.
Referenced by VtkVisPipelineItem(), VtkVisPipelineItem(), VtkVisPointSetItem::VtkVisPointSetItem(), algorithm(), VtkVisPointSetItem::GetRangeForActiveAttribute(), VtkVisImageItem::Initialize(), VtkVisPointSetItem::Initialize(), VtkVisPointSetItem::SetActiveAttribute(), and VtkVisImageItem::writeAsRaster().
|
protected |
Definition at line 132 of file VtkVisPipelineItem.h.
Referenced by VtkVisPipelineItem(), ~VtkVisPipelineItem(), compositeFilter(), and VtkVisPointSetItem::Initialize().
|
protected |
Definition at line 131 of file VtkVisPipelineItem.h.
Referenced by ~VtkVisPipelineItem(), VtkVisImageItem::Initialize(), VtkVisPointSetItem::Initialize(), and setVisible().
|
protected |
The active VtkAlgorithmProperties. From algorithm, compositeFilter, or copied from parent.
Definition at line 136 of file VtkVisPipelineItem.h.
Referenced by VtkVisPointSetItem::GetActiveAttribute(), getVtkProperties(), VtkVisPointSetItem::Initialize(), and VtkVisPointSetItem::SetActiveAttribute().