OGS
|
An item in the VtkVisPipeline containing an image to be visualized.
Any vtkImageAlgorithm object is represented by a VtkVisImageItem to be assigned a mapper, an actor and its visualization properties.
Definition at line 36 of file VtkVisImageItem.h.
#include <VtkVisImageItem.h>
Public Member Functions | |
VtkVisImageItem (vtkAlgorithm *algorithm, TreeItem *parentItem, const QList< QVariant > data=QList< QVariant >()) | |
Constructor for a source/filter object. | |
VtkVisImageItem (VtkCompositeFilter *compositeFilter, TreeItem *parentItem, const QList< QVariant > data=QList< QVariant >()) | |
Constructor for composite filter. | |
~VtkVisImageItem () override | |
void | Initialize (vtkRenderer *renderer) override |
Initializes vtkMapper and vtkActor necessary for visualization of the item and sets the item's properties. | |
void | setTranslation (double x, double y, double z) const override |
Translates the item in visualisation-space. This function is empty and needs to be implemented by derived classes. | |
vtkAlgorithm * | transformFilter () const override |
bool | writeAsRaster () |
Allows writing this item's source object as an ASCII raster file. | |
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. | |
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 | 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 | |
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 | setVtkProperties (VtkAlgorithmProperties *vtkProps) |
Protected Member Functions inherited from VtkVisPipelineItem |
Private Attributes | |
vtkImageChangeInformation * | _transformFilter |
Additional Inherited Members | |
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. | |
VtkVisImageItem::VtkVisImageItem | ( | vtkAlgorithm * | algorithm, |
TreeItem * | parentItem, | ||
const QList< QVariant > | data = QList<QVariant>() ) |
Constructor for a source/filter object.
Definition at line 44 of file VtkVisImageItem.cpp.
VtkVisImageItem::VtkVisImageItem | ( | VtkCompositeFilter * | compositeFilter, |
TreeItem * | parentItem, | ||
const QList< QVariant > | data = QList<QVariant>() ) |
Constructor for composite filter.
Definition at line 51 of file VtkVisImageItem.cpp.
|
override |
Definition at line 59 of file VtkVisImageItem.cpp.
References _transformFilter.
|
overrideprotectedvirtual |
Selects the appropriate VTK-Writer object and writes the object to a file with the given name.
Reimplemented from VtkVisPipelineItem.
Definition at line 158 of file VtkVisImageItem.cpp.
References VtkVisPipelineItem::algorithm(), ERR(), and BaseLib::getFileExtension().
|
overridevirtual |
Initializes vtkMapper and vtkActor necessary for visualization of the item and sets the item's properties.
Implements VtkVisPipelineItem.
Definition at line 64 of file VtkVisImageItem.cpp.
References VtkVisPipelineItem::_actor, VtkVisPipelineItem::_algorithm, VtkVisPipelineItem::_renderer, _transformFilter, TreeItem::parentItem(), VtkVisPipelineItem::SetActiveAttribute(), and setVtkProperties().
|
overridevirtual |
Translates the item in visualisation-space. This function is empty and needs to be implemented by derived classes.
Reimplemented from VtkVisPipelineItem.
Definition at line 179 of file VtkVisImageItem.cpp.
References _transformFilter.
|
protected |
Definition at line 152 of file VtkVisImageItem.cpp.
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 184 of file VtkVisImageItem.cpp.
References _transformFilter.
Referenced by VtkVisTabWidget::setActiveItem().
bool VtkVisImageItem::writeAsRaster | ( | ) |
Allows writing this item's source object as an ASCII raster file.
Definition at line 189 of file VtkVisImageItem.cpp.
References VtkVisPipelineItem::_algorithm, OGSError::box(), VtkGeoImageSource::convertToRaster(), VtkVisPipelineItem::data(), LastSavedFileDirectory::getDir(), LastSavedFileDirectory::setDir(), and FileIO::AsciiRasterInterface::writeRasterAsASC().
Referenced by VtkVisPipelineView::writeRaster().
|
private |
Definition at line 68 of file VtkVisImageItem.h.
Referenced by ~VtkVisImageItem(), Initialize(), setTranslation(), and transformFilter().