ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
qCanupo2DViewDialog Class Reference

CANUPO plugin's 2D view dialog. More...

#include <qCanupo2DViewDialog.h>

Inheritance diagram for qCanupo2DViewDialog:
Collaboration diagram for qCanupo2DViewDialog:

Public Slots

bool trainClassifier ()
 Trains the classifier (with the current number of scales!) More...
 

Public Member Functions

 qCanupo2DViewDialog (const CorePointDescSet *descriptors1, const CorePointDescSet *descriptors2, QString cloud1Name, QString cloud2Name, int class1=1, int class2=2, const CorePointDescSet *evaluationDescriptors=0, ecvMainAppInterface *app=0)
 Default constructor. More...
 
virtual ~qCanupo2DViewDialog ()
 Destructor. More...
 
void setPickingRadius (int radius)
 Sets picking radius (for polyline vertices) More...
 
const ClassifiergetClassifier ()
 Returns classifier. More...
 

Protected Slots

void resetBoundary ()
 Updates the boundary representation. More...
 
void computeStatistics ()
 Computes statistics with the current classifier. More...
 
void saveClassifier ()
 
void checkBeforeAccept ()
 
void setPointSize (int)
 
void onScalesCountSpinBoxChanged (int)
 
void addOrSelectPoint (int, int)
 
void removePoint (int, int)
 
void moveSelectedPoint (int, int, Qt::MouseButtons)
 
void deselectPoint ()
 

Protected Member Functions

void reset ()
 Resets display. More...
 
void updateScalesList (bool firstTime)
 Updates the list of active scales. More...
 
void getActiveScales (std::vector< float > &scales) const
 Returns the list of active scales. More...
 
void addObject (ccHObject *obj)
 Adds a custom object to the 2D view. More...
 
void updateZoom ()
 Updates zoom. More...
 
void updateClassifierPath (Classifier &classifier) const
 Updates classifier path with the currently displayed polyline. More...
 
CCVector3 getClickPos (int x, int y) const
 Returns the click position in 3D. More...
 
int getClosestVertex (int x, int y, CCVector3 &P) const
 Returns closest vertex. More...
 

Protected Attributes

ecvMainAppInterfacem_app
 Gives access to the application (data-base, UI, etc.) More...
 
Classifier m_classifier
 Associated classifier. More...
 
bool m_classifierSaved
 Whether the classifier has been saved (at least once) More...
 
const CorePointDescSetm_descriptors1
 
const CorePointDescSetm_descriptors2
 
const CorePointDescSetm_evaluationDescriptors
 
int m_class1
 
QString m_cloud1Name
 
int m_class2
 
QString m_cloud2Name
 
ccPointCloudm_cloud
 Associated cloud. More...
 
ccPolylinem_poly
 Associated polyline. More...
 
ccPointCloudm_polyVertices
 Associated polyline vertices. More...
 
int m_selectedPointIndex
 Currently selected polyline point. More...
 
int m_pickingRadius
 Picking radius. More...
 

Detailed Description

CANUPO plugin's 2D view dialog.

Definition at line 24 of file qCanupo2DViewDialog.h.

Constructor & Destructor Documentation

◆ qCanupo2DViewDialog()

qCanupo2DViewDialog::qCanupo2DViewDialog ( const CorePointDescSet descriptors1,
const CorePointDescSet descriptors2,
QString  cloud1Name,
QString  cloud2Name,
int  class1 = 1,
int  class2 = 2,
const CorePointDescSet evaluationDescriptors = 0,
ecvMainAppInterface app = 0 
)

◆ ~qCanupo2DViewDialog()

qCanupo2DViewDialog::~qCanupo2DViewDialog ( )
virtual

Destructor.

Definition at line 117 of file qCanupo2DViewDialog.cpp.

References ecvDisplayTools::GetCurrentScreen(), m_app, and reset().

Member Function Documentation

◆ addObject()

void qCanupo2DViewDialog::addObject ( ccHObject obj)
protected

Adds a custom object to the 2D view.

Definition at line 409 of file qCanupo2DViewDialog.cpp.

References ccDrawableObject::setVisible().

Referenced by resetBoundary(), and trainClassifier().

◆ addOrSelectPoint

◆ checkBeforeAccept

void qCanupo2DViewDialog::checkBeforeAccept ( )
protectedslot

Definition at line 316 of file qCanupo2DViewDialog.cpp.

References m_classifierSaved.

Referenced by qCanupo2DViewDialog().

◆ computeStatistics

void qCanupo2DViewDialog::computeStatistics ( )
protectedslot

◆ deselectPoint

void qCanupo2DViewDialog::deselectPoint ( )
protectedslot

◆ getActiveScales()

void qCanupo2DViewDialog::getActiveScales ( std::vector< float > &  scales) const
protected

Returns the list of active scales.

Definition at line 159 of file qCanupo2DViewDialog.cpp.

References m_descriptors1, and CorePointDescSet::scales().

Referenced by computeStatistics(), and trainClassifier().

◆ getClassifier()

const Classifier& qCanupo2DViewDialog::getClassifier ( )
inline

Returns classifier.

Definition at line 45 of file qCanupo2DViewDialog.h.

References m_classifier.

◆ getClickPos()

◆ getClosestVertex()

int qCanupo2DViewDialog::getClosestVertex ( int  x,
int  y,
CCVector3 P 
) const
protected

◆ moveSelectedPoint

void qCanupo2DViewDialog::moveSelectedPoint ( int  x,
int  y,
Qt::MouseButtons  buttons 
)
protectedslot

◆ onScalesCountSpinBoxChanged

void qCanupo2DViewDialog::onScalesCountSpinBoxChanged ( int  value)
protectedslot

◆ removePoint

◆ reset()

void qCanupo2DViewDialog::reset ( void  )
protected

Resets display.

Definition at line 147 of file qCanupo2DViewDialog.cpp.

References m_cloud, m_poly, and m_polyVertices.

Referenced by trainClassifier(), and ~qCanupo2DViewDialog().

◆ resetBoundary

◆ saveClassifier

◆ setPickingRadius()

void qCanupo2DViewDialog::setPickingRadius ( int  radius)

Sets picking radius (for polyline vertices)

Definition at line 421 of file qCanupo2DViewDialog.cpp.

References m_pickingRadius, and max().

◆ setPointSize

void qCanupo2DViewDialog::setPointSize ( int  value)
protectedslot

Definition at line 308 of file qCanupo2DViewDialog.cpp.

Referenced by qCanupo2DViewDialog().

◆ trainClassifier

◆ updateClassifierPath()

void qCanupo2DViewDialog::updateClassifierPath ( Classifier classifier) const
protected

Updates classifier path with the currently displayed polyline.

Definition at line 398 of file qCanupo2DViewDialog.cpp.

References cloudViewer::ReferenceCloud::getPoint(), m_poly, Classifier::path, cloudViewer::ReferenceCloud::size(), Tuple3Tpl< Type >::x, and Tuple3Tpl< Type >::y.

Referenced by computeStatistics(), and saveClassifier().

◆ updateScalesList()

void qCanupo2DViewDialog::updateScalesList ( bool  firstTime)
protected

Updates the list of active scales.

Definition at line 125 of file qCanupo2DViewDialog.cpp.

References m_descriptors1, m_descriptors2, and CorePointDescSet::scales().

Referenced by onScalesCountSpinBoxChanged(), and qCanupo2DViewDialog().

◆ updateZoom()

void qCanupo2DViewDialog::updateZoom ( )
protected

Member Data Documentation

◆ m_app

ecvMainAppInterface* qCanupo2DViewDialog::m_app
protected

Gives access to the application (data-base, UI, etc.)

Definition at line 95 of file qCanupo2DViewDialog.h.

Referenced by saveClassifier(), trainClassifier(), and ~qCanupo2DViewDialog().

◆ m_class1

int qCanupo2DViewDialog::m_class1
protected

Definition at line 108 of file qCanupo2DViewDialog.h.

Referenced by computeStatistics(), qCanupo2DViewDialog(), and trainClassifier().

◆ m_class2

int qCanupo2DViewDialog::m_class2
protected

Definition at line 110 of file qCanupo2DViewDialog.h.

Referenced by computeStatistics(), qCanupo2DViewDialog(), and trainClassifier().

◆ m_classifier

Classifier qCanupo2DViewDialog::m_classifier
protected

Associated classifier.

Definition at line 98 of file qCanupo2DViewDialog.h.

Referenced by computeStatistics(), getClassifier(), resetBoundary(), saveClassifier(), and trainClassifier().

◆ m_classifierSaved

bool qCanupo2DViewDialog::m_classifierSaved
protected

Whether the classifier has been saved (at least once)

Definition at line 100 of file qCanupo2DViewDialog.h.

Referenced by checkBeforeAccept(), and saveClassifier().

◆ m_cloud

ccPointCloud* qCanupo2DViewDialog::m_cloud
protected

Associated cloud.

Definition at line 114 of file qCanupo2DViewDialog.h.

Referenced by reset(), and trainClassifier().

◆ m_cloud1Name

QString qCanupo2DViewDialog::m_cloud1Name
protected

Definition at line 109 of file qCanupo2DViewDialog.h.

Referenced by computeStatistics(), and qCanupo2DViewDialog().

◆ m_cloud2Name

QString qCanupo2DViewDialog::m_cloud2Name
protected

Definition at line 111 of file qCanupo2DViewDialog.h.

Referenced by computeStatistics(), and qCanupo2DViewDialog().

◆ m_descriptors1

const CorePointDescSet* qCanupo2DViewDialog::m_descriptors1
protected

◆ m_descriptors2

const CorePointDescSet* qCanupo2DViewDialog::m_descriptors2
protected

Definition at line 104 of file qCanupo2DViewDialog.h.

Referenced by computeStatistics(), trainClassifier(), and updateScalesList().

◆ m_evaluationDescriptors

const CorePointDescSet* qCanupo2DViewDialog::m_evaluationDescriptors
protected

Definition at line 105 of file qCanupo2DViewDialog.h.

Referenced by trainClassifier().

◆ m_pickingRadius

int qCanupo2DViewDialog::m_pickingRadius
protected

Picking radius.

Definition at line 123 of file qCanupo2DViewDialog.h.

Referenced by addOrSelectPoint(), removePoint(), and setPickingRadius().

◆ m_poly

ccPolyline* qCanupo2DViewDialog::m_poly
protected

◆ m_polyVertices

ccPointCloud* qCanupo2DViewDialog::m_polyVertices
protected

Associated polyline vertices.

Definition at line 118 of file qCanupo2DViewDialog.h.

Referenced by reset(), and resetBoundary().

◆ m_selectedPointIndex

int qCanupo2DViewDialog::m_selectedPointIndex
protected

Currently selected polyline point.

Definition at line 121 of file qCanupo2DViewDialog.h.

Referenced by addOrSelectPoint(), deselectPoint(), and moveSelectedPoint().


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