ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
cvGenericFilter Class Referenceabstract

#include <cvGenericFilter.h>

Inheritance diagram for cvGenericFilter:
Collaboration diagram for cvGenericFilter:

Public Member Functions

 cvGenericFilter (QWidget *parent=nullptr)
 
virtual ~cvGenericFilter ()
 
virtual void apply ()=0
 
virtual void start ()
 
virtual void update ()
 
virtual void reset ()
 
virtual void restoreOrigin ()
 
virtual ccHObjectgetOutput ()
 
virtual void getOutput (std::vector< ccHObject * > &outputSlices, std::vector< ccPolyline * > &outputContours)
 
virtual bool initModel ()
 
virtual bool setInput (ccHObject *obj)
 
virtual void shift (const CCVector3d &v)
 Shifts the current interactor. More...
 
virtual void updateUi ()
 
virtual void showInteractor (bool state)
 
virtual void getInteractorInfos (ccBBox &bbox, ccGLMatrixd &trans)
 
virtual void getInteractorTransformation (ccGLMatrixd &trans)
 
virtual void getInteractorBounds (ccBBox &bbox)
 
virtual void clearAllActor ()
 
void setUpViewer (PclUtils::PCLVis *viewer)
 
void showOutline (bool show=true)
 
void setNegative (bool state)
 
void setInteractor (vtkRenderWindowInteractor *interactor)
 
vtkRenderWindowInteractor * getInteractor ()
 

Protected Types

enum  DisplayEffect { Opaque , Transparent , Points , Wireframe }
 

Protected Slots

void onDoubleClick (int x, int y)
 

Protected Member Functions

virtual void modelReady ()
 
virtual void dataChanged ()
 
virtual void colorsChanged ()
 
void setDisplayEffect (DisplayEffect effect)
 
DisplayEffect displayEffect () const
 
void safeOff (vtk3DWidget *widget)
 
virtual void initFilter ()
 
virtual void createUi ()
 
void updateSize ()
 
void UpdateScalarRange ()
 
void applyDisplayEffect ()
 
void setScalarBarColors (const QColor &clr1, const QColor &clr2)
 
QColor color1 () const
 
QColor color2 () const
 
void setScalarRange (double min, double max)
 
double scalarMin () const
 
double scalarMax () const
 
vtkSmartPointer< vtkDataArray > getActorScalars (vtkSmartPointer< vtkActor > actor)
 
int getDefaultScalarInterpolationForDataSet (vtkDataSet *data)
 
vtkSmartPointer< vtkLookupTable > createLookupTable (double min, double max)
 
template<class ConfigClass >
void setupConfigWidget (ConfigClass *cc)
 
template<class DataObject , class Mapper >
void createActorFromData (vtkDataObject *dataObj)
 
void showScalarBar (bool show=true)
 
void setOutlineColor (const QColor &clr)
 
bool isValidPolyData () const
 
bool isValidDataSet () const
 
void addActor (const vtkSmartPointer< vtkProp > actor)
 
void removeActor (const vtkSmartPointer< vtkProp > actor)
 
void setResultData (vtkSmartPointer< vtkDataObject > data)
 
vtkSmartPointer< vtkDataObject > resultData () const
 

Protected Attributes

Ui::GenericFilterDlg * m_ui = nullptr
 
DisplayEffect m_displayEffect = Opaque
 
vtkDataObject * m_dataObject = nullptr
 
vtkSmartPointer< vtkDataObject > m_resultData
 
bool m_keepMode
 
bool m_negative
 
bool m_meshMode
 
bool m_preview
 
std::string m_id
 
ccHObjectm_entity = nullptr
 
PclUtils::PCLVism_viewer = nullptr
 
vtkRenderWindowInteractor * m_interactor = nullptr
 
vtkSmartPointer< vtkActor > m_modelActor
 
vtkSmartPointer< vtkLODActor > m_filterActor
 
vtkSmartPointer< vtkScalarBarActor > m_scalarBar
 
vtkSmartPointer< vtkActor > m_outlineActor
 
QColor m_color1 = Qt::blue
 
QColor m_color2 = Qt::red
 
double m_scalarMin = 0.0
 
double m_scalarMax = 1.0
 

Static Protected Attributes

static const int MAX_PREVIEW_NUMBER = 20e4
 

Detailed Description

Definition at line 46 of file cvGenericFilter.h.

Member Enumeration Documentation

◆ DisplayEffect

Enumerator
Opaque 
Transparent 
Points 
Wireframe 

Definition at line 88 of file cvGenericFilter.h.

Constructor & Destructor Documentation

◆ cvGenericFilter()

cvGenericFilter::cvGenericFilter ( QWidget *  parent = nullptr)
explicit

◆ ~cvGenericFilter()

cvGenericFilter::~cvGenericFilter ( )
virtual

Definition at line 63 of file cvGenericFilter.cpp.

References m_dataObject, m_ui, and VtkUtils::vtkSafeDelete().

Member Function Documentation

◆ addActor()

◆ apply()

◆ applyDisplayEffect()

◆ clearAllActor()

◆ color1()

QColor cvGenericFilter::color1 ( ) const
protected

Definition at line 349 of file cvGenericFilter.cpp.

References m_color1.

◆ color2()

QColor cvGenericFilter::color2 ( ) const
protected

Definition at line 351 of file cvGenericFilter.cpp.

References m_color2.

◆ colorsChanged()

void cvGenericFilter::colorsChanged ( )
protectedvirtual

◆ createActorFromData()

template<class DataObject , class Mapper >
void cvGenericFilter::createActorFromData ( vtkDataObject *  dataObj)
protected

◆ createLookupTable()

vtkSmartPointer< vtkLookupTable > cvGenericFilter::createLookupTable ( double  min,
double  max 
)
protected

◆ createUi()

◆ dataChanged()

virtual void cvGenericFilter::dataChanged ( )
inlineprotectedvirtual

◆ displayEffect()

cvGenericFilter::DisplayEffect cvGenericFilter::displayEffect ( ) const
protected

Definition at line 227 of file cvGenericFilter.cpp.

References m_displayEffect.

◆ getActorScalars()

vtkSmartPointer< vtkDataArray > cvGenericFilter::getActorScalars ( vtkSmartPointer< vtkActor >  actor)
protected

Definition at line 362 of file cvGenericFilter.cpp.

Referenced by cvIsoSurfaceFilter::initFilter().

◆ getDefaultScalarInterpolationForDataSet()

int cvGenericFilter::getDefaultScalarInterpolationForDataSet ( vtkDataSet *  data)
protected

Definition at line 369 of file cvGenericFilter.cpp.

References data.

Referenced by cvIsoSurfaceFilter::clearAllActor().

◆ getInteractor()

vtkRenderWindowInteractor* cvGenericFilter::getInteractor ( )
inline

Definition at line 85 of file cvGenericFilter.h.

References m_interactor.

Referenced by cvCutFilter::updateCutWidget().

◆ getInteractorBounds()

virtual void cvGenericFilter::getInteractorBounds ( ccBBox bbox)
inlinevirtual

Reimplemented in cvStreamlineFilter, cvProbeFilter, and cvCutFilter.

Definition at line 72 of file cvGenericFilter.h.

Referenced by PclFiltersTool::getBox(), and getInteractorInfos().

◆ getInteractorInfos()

void cvGenericFilter::getInteractorInfos ( ccBBox bbox,
ccGLMatrixd trans 
)
virtual

Definition at line 188 of file cvGenericFilter.cpp.

References getInteractorBounds(), and getInteractorTransformation().

Referenced by PclFiltersTool::get().

◆ getInteractorTransformation()

virtual void cvGenericFilter::getInteractorTransformation ( ccGLMatrixd trans)
inlinevirtual

Reimplemented in cvStreamlineFilter, cvProbeFilter, and cvCutFilter.

Definition at line 70 of file cvGenericFilter.h.

Referenced by getInteractorInfos().

◆ getOutput() [1/2]

◆ getOutput() [2/2]

void cvGenericFilter::getOutput ( std::vector< ccHObject * > &  outputSlices,
std::vector< ccPolyline * > &  outputContours 
)
virtual

Definition at line 168 of file cvGenericFilter.cpp.

References getOutput().

◆ initFilter()

◆ initModel()

bool cvGenericFilter::initModel ( )
virtual

◆ isValidDataSet()

◆ isValidPolyData()

◆ modelReady()

◆ onDoubleClick

void cvGenericFilter::onDoubleClick ( int  x,
int  y 
)
protectedslot

Definition at line 68 of file cvGenericFilter.cpp.

References applyDisplayEffect().

Referenced by cvGenericFilter().

◆ removeActor()

void cvGenericFilter::removeActor ( const vtkSmartPointer< vtkProp >  actor)
protected

◆ reset()

void cvGenericFilter::reset ( void  )
virtual

Definition at line 208 of file cvGenericFilter.cpp.

References dataChanged(), and update().

Referenced by PclFiltersTool::reset().

◆ restoreOrigin()

void cvGenericFilter::restoreOrigin ( )
virtual

Definition at line 213 of file cvGenericFilter.cpp.

References initModel(), m_viewer, and start().

Referenced by PclFiltersTool::restore().

◆ resultData()

vtkSmartPointer< vtkDataObject > cvGenericFilter::resultData ( ) const
protected

Definition at line 468 of file cvGenericFilter.cpp.

References m_resultData.

Referenced by getOutput(), and cvIsoSurfaceFilter::getOutput().

◆ safeOff()

◆ scalarMax()

double cvGenericFilter::scalarMax ( ) const
protected

Definition at line 360 of file cvGenericFilter.cpp.

References m_scalarMax.

Referenced by cvSliceFilter::apply().

◆ scalarMin()

double cvGenericFilter::scalarMin ( ) const
protected

Definition at line 358 of file cvGenericFilter.cpp.

References m_scalarMin.

Referenced by cvSliceFilter::apply().

◆ setDisplayEffect()

void cvGenericFilter::setDisplayEffect ( cvGenericFilter::DisplayEffect  effect)
protected

◆ setInput()

bool cvGenericFilter::setInput ( ccHObject obj)
virtual

◆ setInteractor()

void cvGenericFilter::setInteractor ( vtkRenderWindowInteractor *  interactor)

Definition at line 460 of file cvGenericFilter.cpp.

References m_interactor.

Referenced by setUpViewer().

◆ setNegative()

void cvGenericFilter::setNegative ( bool  state)
inline

Definition at line 83 of file cvGenericFilter.h.

References m_negative.

Referenced by cvCutFilter::createUi(), and PclFiltersTool::setNegative().

◆ setOutlineColor()

void cvGenericFilter::setOutlineColor ( const QColor &  clr)
protected

Definition at line 331 of file cvGenericFilter.cpp.

References m_outlineActor, update(), and Utils::vtkColor().

◆ setResultData()

◆ setScalarBarColors()

void cvGenericFilter::setScalarBarColors ( const QColor &  clr1,
const QColor &  clr2 
)
protected

Definition at line 340 of file cvGenericFilter.cpp.

References colorsChanged(), m_color1, and m_color2.

Referenced by cvIsoSurfaceFilter::on_gradientCombo_activated().

◆ setScalarRange()

void cvGenericFilter::setScalarRange ( double  min,
double  max 
)
protected

◆ setupConfigWidget()

template<class ConfigClass >
void cvGenericFilter::setupConfigWidget ( ConfigClass *  cc)
inlineprotected

◆ setUpViewer()

void cvGenericFilter::setUpViewer ( PclUtils::PCLVis viewer)

◆ shift()

virtual void cvGenericFilter::shift ( const CCVector3d v)
inlinevirtual

Shifts the current interactor.

Reimplemented in cvStreamlineFilter, cvProbeFilter, and cvCutFilter.

Definition at line 65 of file cvGenericFilter.h.

Referenced by PclFiltersTool::shift().

◆ showInteractor()

virtual void cvGenericFilter::showInteractor ( bool  state)
inlinevirtual

Reimplemented in cvStreamlineFilter, cvProbeFilter, cvGlyphFilter, and cvCutFilter.

Definition at line 68 of file cvGenericFilter.h.

Referenced by PclFiltersTool::showInteractor().

◆ showOutline()

void cvGenericFilter::showOutline ( bool  show = true)

◆ showScalarBar()

void cvGenericFilter::showScalarBar ( bool  show = true)
protected

◆ start()

void cvGenericFilter::start ( void  )
virtual

Definition at line 71 of file cvGenericFilter.cpp.

References dataChanged(), initFilter(), modelReady(), and update().

Referenced by restoreOrigin(), and PclFiltersTool::start().

◆ update()

◆ UpdateScalarRange()

void cvGenericFilter::UpdateScalarRange ( )
protected

◆ updateSize()

void cvGenericFilter::updateSize ( )
protected

Definition at line 231 of file cvGenericFilter.cpp.

Referenced by cvCutFilter::updateCutWidget().

◆ updateUi()

virtual void cvGenericFilter::updateUi ( )
inlinevirtual

Reimplemented in cvCutFilter.

Definition at line 67 of file cvGenericFilter.h.

Referenced by setInput().

Member Data Documentation

◆ m_color1

QColor cvGenericFilter::m_color1 = Qt::blue
protected

Definition at line 170 of file cvGenericFilter.h.

Referenced by color1(), createLookupTable(), and setScalarBarColors().

◆ m_color2

QColor cvGenericFilter::m_color2 = Qt::red
protected

Definition at line 171 of file cvGenericFilter.h.

Referenced by color2(), createLookupTable(), and setScalarBarColors().

◆ m_dataObject

◆ m_displayEffect

DisplayEffect cvGenericFilter::m_displayEffect = Opaque
protected

Definition at line 152 of file cvGenericFilter.h.

Referenced by applyDisplayEffect(), displayEffect(), and setDisplayEffect().

◆ m_entity

ccHObject* cvGenericFilter::m_entity = nullptr
protected

◆ m_filterActor

◆ m_id

std::string cvGenericFilter::m_id
protected

Definition at line 160 of file cvGenericFilter.h.

Referenced by initModel(), and setInput().

◆ m_interactor

vtkRenderWindowInteractor* cvGenericFilter::m_interactor = nullptr
protected

Definition at line 163 of file cvGenericFilter.h.

Referenced by getInteractor(), and setInteractor().

◆ m_keepMode

◆ m_meshMode

◆ m_modelActor

◆ m_negative

bool cvGenericFilter::m_negative
protected

Definition at line 157 of file cvGenericFilter.h.

Referenced by cvClipFilter::apply(), cvClipFilter::getOutput(), and setNegative().

◆ m_outlineActor

vtkSmartPointer<vtkActor> cvGenericFilter::m_outlineActor
protected

Definition at line 168 of file cvGenericFilter.h.

Referenced by clearAllActor(), setOutlineColor(), and showOutline().

◆ m_preview

◆ m_resultData

vtkSmartPointer<vtkDataObject> cvGenericFilter::m_resultData
protected

Definition at line 154 of file cvGenericFilter.h.

Referenced by initModel(), resultData(), and setResultData().

◆ m_scalarBar

◆ m_scalarMax

double cvGenericFilter::m_scalarMax = 1.0
protected

◆ m_scalarMin

double cvGenericFilter::m_scalarMin = 0.0
protected

◆ m_ui

Ui::GenericFilterDlg* cvGenericFilter::m_ui = nullptr
protected

Definition at line 150 of file cvGenericFilter.h.

Referenced by setupConfigWidget(), and ~cvGenericFilter().

◆ m_viewer

PclUtils::PCLVis* cvGenericFilter::m_viewer = nullptr
protected

◆ MAX_PREVIEW_NUMBER

const int cvGenericFilter::MAX_PREVIEW_NUMBER = 20e4
staticprotected

Definition at line 174 of file cvGenericFilter.h.

Referenced by initModel().


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