open_iA 2025.6
Loading...
Searching...
No Matches
iAColoredPolyObjectVis Class Referenceabstract

Base class for polydata-based object visualizations that can be colored. More...

#include <iAColoredPolyObjectVis.h>

Inheritance diagram for iAColoredPolyObjectVis:
[legend]
Collaboration diagram for iAColoredPolyObjectVis:
[legend]

Signals

void selectionChanged ()
 
- Signals inherited from iAObjectVis
void dataChanged ()
 
void renderRequired ()
 

Public Member Functions

 iAColoredPolyObjectVis (iAObjectsData const *, QColor const &neutralColor)
 
IndexType allPointCount () const
 Get the number of points in all objects.
 
double const * bounds () override
 
std::shared_ptr< iAObjectVisActorcreateActor (vtkRenderer *ren) override
 create "actor" class for visualizing this data collection
 
std::shared_ptr< iAPolyObjectVisActorcreatePolyActor (vtkRenderer *ren)
 same as createActor, but retrieve derived class more specific for visualizing a 3D colored poly data object; use this if you need to access methods from the iAPolyObjectVisActorclass which are not available through the iAObjectVisActor interface.
 
virtual std::vector< vtkSmartPointer< vtkPolyData > > extractSelectedObjects (QColor c=QColor()) const =0
 extract one mesh per selected object
 
IndexType finalAllPointCount () const
 Get the number of points in all final objects.
 
virtual IndexType finalObjectPointCount (IndexType objIdx) const
 Get the number of points representing a given final object.
 
virtual IndexType finalObjectStartPointIdx (IndexType objIdx) const
 Get the index of the first point of a given final object.
 
virtual vtkPolyData * finalPolyData ()=0
 
virtual IndexType objectPointCount (IndexType objIdx) const
 Get the number of points representing a given object.
 
virtual IndexType objectStartPointIdx (IndexType objIdx) const
 Get the index of the first point of a given object.
 
virtual vtkPolyData * polyData ()=0
 
std::vector< size_t > const & selection () const
 
void setColor (QColor const &color)
 
void setContextOpacity (int contextAlpha)
 
void setLookupTable (std::shared_ptr< iALookupTable > lut, size_t paramIndex)
 
virtual void setSelection (std::vector< size_t > const &sortedSelInds, bool selectionActive)
 
void setSelectionOpacity (int selectionAlpha)
 
void updateColorSelectionRendering ()
 
virtual QString visualizationStatistics () const =0
 
void renderSelection (std::vector< size_t > const &sortedSelInds, int classID, QColor const &classColor, QStandardItem *activeClassItem) override
 "legacy" methods for various selection/coloring options, specific to FeatureScout module
 
void renderSingle (IndexType selectedObjID, int classID, QColor const &classColors, QStandardItem *activeClassItem) override
 
void multiClassRendering (QList< QColor > const &colors, QStandardItem *rootItem, double alpha) override
 
void renderOrientationDistribution (vtkImageData *oi) override
 
void renderLengthDistribution (vtkColorTransferFunction *ctFun, vtkFloatArray *extents, double halfInc, int filterID, double const *range) override
 
- Public Member Functions inherited from iAObjectVis
 iAObjectVis (iAObjectsData const *data)
 
virtual ~iAObjectVis ()
 

Static Public Attributes

static const int DefaultContextOpacity = 8
 
static const int DefaultSelectionOpacity = 128
 
- Static Public Attributes inherited from iAObjectVis
static const QColor SelectedColor
 

Protected Member Functions

void setObjectColor (IndexType objIdx, QColor const &qcolor)
 Set an object to a specified color.
 
void setupColors ()
 Set up the array of colors for each object.
 
void setupOriginalIds ()
 Set up the mapping from object parts to object IDs.
 
- Protected Member Functions inherited from iAObjectVis
QColor getLengthColor (vtkColorTransferFunction *ctFun, IndexType objID) const
 
QColor getOrientationColor (vtkImageData *oi, IndexType objID) const
 

Protected Attributes

QColor m_baseColor
 
vtkSmartPointer< vtkUnsignedCharArray > m_colors
 
int m_contextAlpha
 
std::vector< size_t > m_selection
 
int m_selectionAlpha
 
QColor m_selectionColor
 
- Protected Attributes inherited from iAObjectVis
iAObjectsData const * m_data
 

Additional Inherited Members

- Public Types inherited from iAObjectVis
using IndexType = vtkIdType
 the type used for indices into the data table.
 

Detailed Description

Base class for polydata-based object visualizations that can be colored.

Constructor & Destructor Documentation

◆ iAColoredPolyObjectVis()

iAColoredPolyObjectVis::iAColoredPolyObjectVis ( iAObjectsData const * data,
QColor const & neutralColor )

Member Function Documentation

◆ allPointCount()

iAColoredPolyObjectVis::IndexType iAColoredPolyObjectVis::allPointCount ( ) const

Get the number of points in all objects.

Returns
the number of points in all objects, i.e. the sum of objectPointCount over all object indices.

◆ bounds()

double const * iAColoredPolyObjectVis::bounds ( )
overridevirtual

Implements iAObjectVis.

Reimplemented in iAEllipsoidObjectVis.

◆ createActor()

std::shared_ptr< iAObjectVisActor > iAColoredPolyObjectVis::createActor ( vtkRenderer * ren)
overridevirtual

create "actor" class for visualizing this data collection

Implements iAObjectVis.

◆ createPolyActor()

std::shared_ptr< iAPolyObjectVisActor > iAColoredPolyObjectVis::createPolyActor ( vtkRenderer * ren)

same as createActor, but retrieve derived class more specific for visualizing a 3D colored poly data object; use this if you need to access methods from the iAPolyObjectVisActorclass which are not available through the iAObjectVisActor interface.

◆ extractSelectedObjects()

virtual std::vector< vtkSmartPointer< vtkPolyData > > iAColoredPolyObjectVis::extractSelectedObjects ( QColor c = QColor()) const
pure virtual

extract one mesh per selected object

Implemented in iACylinderObjectVis, iAEllipsoidObjectVis, and iALineObjectVis.

◆ finalAllPointCount()

iAColoredPolyObjectVis::IndexType iAColoredPolyObjectVis::finalAllPointCount ( ) const

Get the number of points in all final objects.

Returns
the number of points in all objects, i.e. the sum of objectPointCount over all object indices.

◆ finalObjectPointCount()

iAColoredPolyObjectVis::IndexType iAColoredPolyObjectVis::finalObjectPointCount ( IndexType objIdx) const
virtual

Get the number of points representing a given final object.

Parameters
objIdxthe index of the object.
Returns
the number of points in the final object.

Reimplemented in iACylinderObjectVis.

◆ finalObjectStartPointIdx()

iAColoredPolyObjectVis::IndexType iAColoredPolyObjectVis::finalObjectStartPointIdx ( IndexType objIdx) const
virtual

Get the index of the first point of a given final object.

Parameters
objIdxthe index of the object.
Returns
the index of the first point in the final object.

Reimplemented in iACylinderObjectVis.

◆ finalPolyData()

virtual vtkPolyData * iAColoredPolyObjectVis::finalPolyData ( )
pure virtual

◆ multiClassRendering()

void iAColoredPolyObjectVis::multiClassRendering ( QList< QColor > const & colors,
QStandardItem * rootItem,
double alpha )
overridevirtual

Implements iAObjectVis.

◆ objectPointCount()

iAColoredPolyObjectVis::IndexType iAColoredPolyObjectVis::objectPointCount ( IndexType objIdx) const
virtual

Get the number of points representing a given object.

Parameters
objIdxthe index of the object.
Returns
the number of points in the object.

Reimplemented in iAEllipsoidObjectVis, and iALineObjectVis.

◆ objectStartPointIdx()

iAColoredPolyObjectVis::IndexType iAColoredPolyObjectVis::objectStartPointIdx ( IndexType objIdx) const
virtual

Get the index of the first point of a given object.

Parameters
objIdxthe index of the object.
Returns
the index of the first point in the object.

Reimplemented in iAEllipsoidObjectVis, and iALineObjectVis.

◆ polyData()

virtual vtkPolyData * iAColoredPolyObjectVis::polyData ( )
pure virtual

Implemented in iAEllipsoidObjectVis, and iALineObjectVis.

◆ renderLengthDistribution()

void iAColoredPolyObjectVis::renderLengthDistribution ( vtkColorTransferFunction * ctFun,
vtkFloatArray * extents,
double halfInc,
int filterID,
double const * range )
overridevirtual

Implements iAObjectVis.

◆ renderOrientationDistribution()

void iAColoredPolyObjectVis::renderOrientationDistribution ( vtkImageData * oi)
overridevirtual

Implements iAObjectVis.

◆ renderSelection()

void iAColoredPolyObjectVis::renderSelection ( std::vector< size_t > const & sortedSelInds,
int classID,
QColor const & classColor,
QStandardItem * activeClassItem )
overridevirtual

"legacy" methods for various selection/coloring options, specific to FeatureScout module

Implements iAObjectVis.

◆ renderSingle()

void iAColoredPolyObjectVis::renderSingle ( IndexType selectedObjID,
int classID,
QColor const & classColors,
QStandardItem * activeClassItem )
overridevirtual

Implements iAObjectVis.

◆ selection()

std::vector< size_t > const & iAColoredPolyObjectVis::selection ( ) const

◆ selectionChanged

void iAColoredPolyObjectVis::selectionChanged ( )
signal

◆ setColor()

void iAColoredPolyObjectVis::setColor ( QColor const & color)

◆ setContextOpacity()

void iAColoredPolyObjectVis::setContextOpacity ( int contextAlpha)

◆ setLookupTable()

void iAColoredPolyObjectVis::setLookupTable ( std::shared_ptr< iALookupTable > lut,
size_t paramIndex )

◆ setObjectColor()

void iAColoredPolyObjectVis::setObjectColor ( IndexType objIdx,
QColor const & qcolor )
protected

Set an object to a specified color.

Parameters
objIdxindex of the object.
qcolornew color of the object.

◆ setSelection()

void iAColoredPolyObjectVis::setSelection ( std::vector< size_t > const & sortedSelInds,
bool selectionActive )
virtual

Reimplemented in iACylinderObjectVis.

◆ setSelectionOpacity()

void iAColoredPolyObjectVis::setSelectionOpacity ( int selectionAlpha)

◆ setupColors()

void iAColoredPolyObjectVis::setupColors ( )
protected

Set up the array of colors for each object.

◆ setupOriginalIds()

void iAColoredPolyObjectVis::setupOriginalIds ( )
protected

Set up the mapping from object parts to object IDs.

◆ updateColorSelectionRendering()

void iAColoredPolyObjectVis::updateColorSelectionRendering ( )

◆ visualizationStatistics()

virtual QString iAColoredPolyObjectVis::visualizationStatistics ( ) const
pure virtual

Member Data Documentation

◆ DefaultContextOpacity

const int iAColoredPolyObjectVis::DefaultContextOpacity = 8
static

◆ DefaultSelectionOpacity

const int iAColoredPolyObjectVis::DefaultSelectionOpacity = 128
static

◆ m_baseColor

QColor iAColoredPolyObjectVis::m_baseColor
protected

◆ m_colors

vtkSmartPointer<vtkUnsignedCharArray> iAColoredPolyObjectVis::m_colors
protected

◆ m_contextAlpha

int iAColoredPolyObjectVis::m_contextAlpha
protected

◆ m_selection

std::vector<size_t> iAColoredPolyObjectVis::m_selection
protected

◆ m_selectionAlpha

int iAColoredPolyObjectVis::m_selectionAlpha
protected

◆ m_selectionColor

QColor iAColoredPolyObjectVis::m_selectionColor
protected

The documentation for this class was generated from the following files: