 |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
Go to the documentation of this file.
23 #include <ui_pointPairRegistrationDlg.h>
32 Ui::pointPairRegistrationDlg {
39 QWidget* parent =
nullptr);
42 bool linkWith(QWidget* win)
override;
43 bool start()
override;
44 void stop(
bool state)
override;
47 bool init(QWidget* win,
55 void pause(
bool state);
static double s_last_rx
Definition: ecvPointPairRegistrationDlg.cpp:457
bool addPickedPoint(ccGenericPointCloud *cloud, unsigned pointIndex, bool entityCenter=false)
Adds a point to this label.
Definition: ecv2DLabel.cpp:400
Original cloud context.
Definition: ecvPointPairRegistrationDlg.h:149
ccGLMatrix m_transMatHistory
Definition: ecvPointPairRegistrationDlg.h:189
static void SetEnabled_recursive(ccHObject *ent)
Definition: ecvPointPairRegistrationDlg.cpp:275
bool isKindOf(CV_CLASS_ENUM type) const
Definition: ecvObject.h:128
static double s_last_ay
Definition: ecvPointPairRegistrationDlg.cpp:426
@ CC_DRAW_3D
Definition: ecvDrawContext.h:331
void setDisplayedIn2D(bool state)
Whether to display the label in 2D.
Definition: ecv2DLabel.h:114
virtual cloudViewer::ReferenceCloud * crop(const ccBBox &box, bool inside=true)=0
Crops the cloud inside (or outside) a bounding box.
void invalidateBoundingBox() override
Invalidates bounding box.
Definition: ecvPointCloud.cpp:1706
static const unsigned MIN_PAIRS_COUNT
Definition: ecvPointPairRegistrationDlg.cpp:44
void add(const Vector3Tpl< T > &P)
'Enlarges' the bounding box with a point
Definition: BoundingBox.h:131
virtual ccHObjectContext removeObjectTemporarilyFromDBTree(ccHObject *obj)=0
Removes object temporarily from DB tree.
CCVector3 computeGravityCenter()
Returns the cloud gravity center.
Definition: ecvPointCloud.cpp:2485
normal_z x
Definition: my_point_types.h:165
ccPointPairRegistrationDlg(ccPickingHub *pickingHub, ecvMainAppInterface *app, QWidget *parent=nullptr)
Default constructor.
Definition: ecvPointPairRegistrationDlg.cpp:46
bool isValid() const
Returns matrix validity.
Definition: SquareMatrix.h:138
bool convertToSphereCenter(CCVector3d &P, ccHObject *entity, PointCoordinateType &sphereRadius)
Converts a picked point to a sphere center (if necessary)
Definition: ecvPointPairRegistrationDlg.cpp:496
Type x
Definition: CVGeom.h:137
unsigned size() const override
Returns the number of points.
Definition: ReferenceCloud.h:41
void reset()
Definition: ecvPointPairRegistrationDlg.cpp:1457
ccGLMatrixTpl< T > inverse() const
Returns inverse transformation.
Definition: ecvGLMatrixTpl.h:1325
void displayPointLegend(bool state)
Whether to display the point(s) legend (title only)
Definition: ecv2DLabel.h:108
static double s_last_ax
Definition: ecvPointPairRegistrationDlg.cpp:425
ccHObject * getParent() const
Returns parent object.
Definition: ecvHObject.h:245
bool getCheckboxState() const
Returns.
Definition: ecvAskThreeDoubleValuesDlg.cpp:55
void updateLabel()
Definition: ecv2DLabel.cpp:312
void stop(bool state) override
Stops process/dialog.
Definition: ecvPointPairRegistrationDlg.cpp:260
const float Pi
Definition: utils.cpp:15
static double s_last_rz
Definition: ecvPointPairRegistrationDlg.cpp:459
static bool Handle(const CCVector3d &P, double diagonal, Mode mode, bool useInputCoordinatesShiftIfPossible, CCVector3d &coordinatesShift, bool *preserveCoordinateShift, double *coordinatesScale, bool *applyAll=0)
Definition: ecvGlobalShiftManager.cpp:82
void updateSphereMarks(ccHObject *obj, bool remove)
Definition: ecvPointPairRegistrationDlg.cpp:1081
void clear(bool ignoreDependencies=false, bool ignoreCaption=true)
Clears label.
Definition: ecv2DLabel.cpp:240
void removeChild(ccHObject *child)
Definition: ecvHObject.cpp:1056
bool linkWith(QWidget *win) override
Links the overlay dialog with a MDI window.
Definition: ecvPointPairRegistrationDlg.cpp:233
void setRedrawFlagRecursive(bool redraw=false)
Definition: ecvHObject.cpp:772
virtual void setName(const QString &name)
Sets object name.
Definition: ecvObject.h:75
bool addListener(ccPickingListener *listener, bool exclusive=false, bool autoStartPicking=true, ecvDisplayTools::PICKING_MODE mode=ecvDisplayTools::POINT_OR_TRIANGLE_PICKING)
Adds a listener.
Definition: ecvPickingHub.cpp:104
bool isA(CV_CLASS_ENUM type) const
Definition: ecvObject.h:131
Bounding box structure.
Definition: ecvBBox.h:25
bool isShifted() const
Returns whether the cloud is shifted or not.
Definition: ecvShiftedObject.h:56
virtual void setGlobalScale(double scale)
Definition: ecvShiftedObject.cpp:33
static bool Print(const char *format,...)
Prints out a formatted message in console.
Definition: CVLog.cpp:113
void setTranslation(const Vector3Tpl< float > &Tr)
Sets translation (float version)
Definition: ecvGLMatrixTpl.h:836
ccHObject * entity
Definition: ecvPointPairRegistrationDlg.h:156
@ POINT_CLOUD
Definition: CVTypes.h:104
virtual void toIdentity()
Sets matrix to identity.
Definition: ecvGLMatrixTpl.h:622
const CCVector3 * getPoint(unsigned index) const override
Definition: PointCloudTpl.h:143
Standard parameters for GL displays/viewports.
Definition: ecvViewportParameters.h:18
void scale(Scalar coef)
Scales matrix (all elements are multiplied by the same coef.)
Definition: SquareMatrix.h:459
static double s_last_az
Definition: ecvPointPairRegistrationDlg.cpp:427
void showReferenceEntities(bool)
Slot called to change reference cloud visibility.
Definition: ecvPointPairRegistrationDlg.cpp:1165
unsigned size() const override
Definition: PointCloudTpl.h:38
A 3D cloud and its associated features (color, normals, scalar fields, etc.)
Definition: ecvPointCloud.h:146
static QString s_aligned_tooltip
Definition: ecvPointPairRegistrationDlg.cpp:422
2D label (typically attached to points)
Definition: ecv2DLabel.h:22
void addManualAlignedPoint()
Slot called to add a manual point to the 'align' set.
Definition: ecvPointPairRegistrationDlg.cpp:429
Set of contexts.
Definition: ecvPointPairRegistrationDlg.h:163
static bool s_lastAlignePointIsGlobal
Definition: ecvPointPairRegistrationDlg.cpp:428
static cc2DLabel * To2DLabel(ccHObject *obj)
Converts current object to cc2DLabel (if possible)
Definition: ecvHObjectCaster.cpp:262
void updateAlignInfo()
Updates the registration info and buttons states.
Definition: ecvPointPairRegistrationDlg.cpp:1301
ccPointCloud m_alignedPoints
Aligned points set.
Definition: ecvPointPairRegistrationDlg.h:178
Point/triangle picking listener interface.
Definition: ecvPickingListener.h:21
void showCheckbox(const QString &label, bool state, QString tooltip=QString())
Enable the checkbox (bottom-left)
Definition: ecvAskThreeDoubleValuesDlg.cpp:45
void unstackRef()
Slot called to remove the last point on the 'reference' stack.
Definition: ecvPointPairRegistrationDlg.cpp:919
virtual ccBBox getDisplayBB_recursive(bool relative)
Returns the bounding-box of this entity and it's children WHEN DISPLAYED.
Definition: ecvHObject.cpp:817
Sphere (primitive)
Definition: ecvSphere.h:16
void unstackAligned()
Slot called to remove the last point on the 'align' stack.
Definition: ecvPointPairRegistrationDlg.cpp:898
void clearRMSColumns()
Clears the RMS rows.
Definition: ecvPointPairRegistrationDlg.cpp:1283
std::vector< ccHObject * > Container
Standard instances container (for children, etc.)
Definition: ecvHObject.h:337
Vector3Tpl< PointCoordinateType > CCVector3
Default 3D Vector.
Definition: CVGeom.h:798
void clear()
Clears dialog.
Definition: ecvPointPairRegistrationDlg.cpp:175
Vector3Tpl< double > CCVector3d
Double 3D Vector.
Definition: CVGeom.h:804
void align()
Definition: ecvPointPairRegistrationDlg.cpp:1328
Backup "context" for an object.
Definition: ecvMainAppInterface.h:80
virtual bool linkWith(QWidget *win)
Links the overlay dialog with a MDI window.
Definition: ecvOverlayDialog.cpp:32
static bool Error(const char *format,...)
Display an error dialog with formatted message.
Definition: CVLog.cpp:143
ImGuiContext * context
Definition: Window.cpp:76
ccPickingHub * m_pickingHub
Picking hub.
Definition: ecvPointPairRegistrationDlg.h:195
#define slots
Definition: PythonPlugin.cpp:25
@ SPHERE
Definition: CVTypes.h:121
virtual const CCVector3d & getGlobalShift() const
Returns the shift applied to original coordinates.
Definition: ecvShiftedObject.h:46
normal_z y
Definition: my_point_types.h:168
Vector3Tpl< double > toDouble() const
Cast operator to a double vector (explicit call version)
Definition: CVGeom.h:255
Main application interface (for plugins)
Definition: ecvMainAppInterface.h:24
ccHObject * entity
Definition: ecvPickingListener.h:30
ccPointCloud m_refPoints
Reference points set.
Definition: ecvPointPairRegistrationDlg.h:184
bool wasVisible
Definition: ecvPointPairRegistrationDlg.h:157
@ CC_DRAW_FOREGROUND
Definition: ecvDrawContext.h:332
A 3D cloud interface with associated features (color, normals, octree, etc.)
Definition: ecvGenericPointCloud.h:45
EntityContexts m_alignedEntities
Aligned entity.
Definition: ecvPointPairRegistrationDlg.h:175
CCVector3 toLocal3pc(const Vector3Tpl< T > &Pglobal) const
Returns the point projected into the local (shifted) coordinates system.
Definition: ecvShiftedObject.h:77
ccHObject m_alignedLabels
Definition: ecvPointPairRegistrationDlg.h:187
void pause(bool state)
Pauses the dialog.
Definition: ecvPointPairRegistrationDlg.cpp:491
constexpr Rgb yellow(MAX, MAX, 0)
virtual bool start()
Starts process.
Definition: ecvOverlayDialog.cpp:80
static ccShiftedObject * ToShifted(ccHObject *obj, bool *isLockedVertices=nullptr)
Converts current object to 'equivalent' ccShiftedObject.
Definition: ecvHObjectCaster.cpp:108
void apply()
Definition: ecvPointPairRegistrationDlg.cpp:1513
void applyGLTransformation_recursive(const ccGLMatrix *trans=nullptr)
Applies the active OpenGL transformation to the entity (recursive)
Definition: ecvHObject.cpp:948
bool wasSelected
Definition: ecvPointPairRegistrationDlg.h:159
static const int DEL_BUTTON_COL_INDEX
Definition: ecvPointPairRegistrationDlg.cpp:41
bool isValid() const
Returns whether bounding box is valid or not.
Definition: BoundingBox.h:203
unsigned capacity() const
Returns cloud capacity (i.e. reserved size)
Definition: PointCloudTpl.h:540
void onDelButtonPushed()
Slot called when a "delete" button is pushed.
Definition: ecvPointPairRegistrationDlg.cpp:649
bool reserve(unsigned numberOfPoints) override
Reserves memory for all the active features.
Definition: ecvPointCloud.cpp:1452
bool start() override
Starts process.
Definition: ecvPointPairRegistrationDlg.cpp:244
void restore()
Restores cloud original state.
Definition: ecvPointPairRegistrationDlg.cpp:138
bool m_paused
Whether the dialog is paused or not.
Definition: ecvPointPairRegistrationDlg.h:192
Graphical progress indicator (thread-safe)
Definition: ecvProgressDialog.h:27
@ LABEL_2D
Definition: CVTypes.h:140
@ ECV_MESH
Definition: ecvDrawContext.h:54
virtual void putObjectBackIntoDBTree(ccHObject *obj, const ccHObjectContext &context)=0
Adds back object to DB tree.
bool addAlignedPoint(CCVector3d &P, ccHObject *entity=nullptr, bool shifted=true)
Adds a point to the 'align' set.
Definition: ecvPointPairRegistrationDlg.cpp:825
void zoomGlobalOnRegistrationEntities()
Definition: ecvPointPairRegistrationDlg.cpp:1492
void updateAlignedMarkers(int index)
Definition: ecvPointPairRegistrationDlg.cpp:1103
CCVector3d shift
Definition: ecvPointPairRegistrationDlg.h:171
Shifted entity interface.
Definition: ecvShiftedObject.h:18
void addManualRefPoint()
Slot called to add a manual point to the 'reference' set.
Definition: ecvPointPairRegistrationDlg.cpp:461
virtual void setVisible(bool state)
Sets entity visibility.
Definition: ecvDrawableObject.h:40
void fill(const ccHObject::Container &entities)
Definition: ecvPointPairRegistrationDlg.cpp:150
Type z
Definition: CVGeom.h:137
bool wasEnabled
Definition: ecvPointPairRegistrationDlg.h:158
CCVector3d toGlobal3d(const Vector3Tpl< T > &Plocal) const
Returns the point back-projected into the original coordinates system.
Definition: ecvShiftedObject.h:64
bool resize(unsigned numberOfPoints) override
Resizes all the active features arrays.
Definition: ecvPointCloud.cpp:1476
static const int XYZ_COL_INDEX
Definition: ecvPointPairRegistrationDlg.cpp:39
bool isShifted
Definition: ecvPointPairRegistrationDlg.h:170
void onPointCountChanged()
Enables (or not) buttons depending on the number of points in both lists.
Definition: ecvPointPairRegistrationDlg.cpp:610
void draw(CC_DRAW_CONTEXT &context) override
Draws entity and its children.
Definition: ecvHObject.cpp:1438
CCVector3 P3D
Definition: ecvPickingListener.h:32
void resetTitle()
Resets the displayed title (3D view)
Definition: ecvPointPairRegistrationDlg.cpp:1291
constexpr PointCoordinateType PC_ONE
'1' as a PointCoordinateType value
Definition: CVConst.h:67
unsigned getChildrenNumber() const
Returns the number of children.
Definition: ecvHObject.h:312
Float version of ccGLMatrixTpl.
Definition: ecvGLMatrix.h:19
virtual void stop(bool accepted)
Stops process/dialog.
Definition: ecvOverlayDialog.cpp:91
virtual bool move2D(int x, int y, int dx, int dy, int screenWidth, int screenHeight) override
Called on mouse move (for 2D interactors)
Definition: ecv2DLabel.cpp:230
void transformAlignedEntity(const ccGLMatrix &transMat, bool apply=true)
Definition: ecvPointPairRegistrationDlg.cpp:1435
static const int RMS_COL_INDEX
Definition: ecvPointPairRegistrationDlg.cpp:40
ccHObject m_refLabels
Definition: ecvPointPairRegistrationDlg.h:186
bool addReferencePoint(CCVector3d &P, ccHObject *entity=nullptr, bool shifted=true)
Adds a point to the 'reference' set.
Definition: ecvPointPairRegistrationDlg.cpp:722
QWidget * m_associatedWin
Associated (MDI) window.
Definition: ecvOverlayDialog.h:84
void label2DMove(int x, int y, int dx, int dy)
Definition: ecvPointPairRegistrationDlg.cpp:281
static bool Warning(const char *format,...)
Prints out a formatted warning message in console.
Definition: CVLog.cpp:133
Generic overlay dialog interface.
Definition: ecvOverlayDialog.h:17
A very simple point cloud (no point duplication)
Definition: ReferenceCloud.h:29
virtual void showNameIn3D(bool state)
Sets whether name should be displayed in 3D.
Definition: ecvDrawableObject.h:125
Point/triangle picking hub.
Definition: ecvPickingHub.h:29
static QToolButton * CreateDeleteButton()
Definition: ecvPointPairRegistrationDlg.cpp:622
bool init(QWidget *win, const ccHObject::Container &alignedEntities, const ccHObject::Container *referenceEntities=nullptr)
Inits dialog.
Definition: ecvPointPairRegistrationDlg.cpp:333
void restoreAll()
Definition: ecvPointPairRegistrationDlg.h:166
@ DIALOG_IF_NECESSARY
Definition: ecvGlobalShiftManager.h:32
ccHObject * getChild(unsigned childPos) const
Returns the ith child.
Definition: ecvHObject.h:325
void clearLabel(bool ignoreCaption=true)
Definition: ecv2DLabel.cpp:303
virtual double getGlobalScale() const
Returns the scale applied to original coordinates.
Definition: ecvShiftedObject.h:53
EntityContext(ccHObject *ent)
Default constructor.
Definition: ecvPointPairRegistrationDlg.cpp:132
static double s_last_ry
Definition: ecvPointPairRegistrationDlg.cpp:458
void update2DLabelView(CC_DRAW_CONTEXT &context, bool updateScreen=true)
Definition: ecv2DLabel.cpp:329
virtual void setGlobalShift(double x, double y, double z)
Sets shift applied to original coordinates (information storage only)
Definition: ecvShiftedObject.h:33
void removeAlignedPoint(int index, bool autoRemoveDualPoint=true)
Removes a point from the 'align' set.
Definition: ecvPointPairRegistrationDlg.cpp:945
void updateAllMarkers(float markerSize)
Definition: ecvPointPairRegistrationDlg.cpp:1406
@ CC_DRAW_2D
Definition: ecvDrawContext.h:330
Hierarchical CLOUDVIEWER Object.
Definition: ecvHObject.h:25
void addPointToTable(QTableWidget *tableWidget, int rowIndex, const CCVector3d &P, QString pointLabel)
Adds a point to one of the table (ref./aligned)
Definition: ecvPointPairRegistrationDlg.cpp:689
Type y
Definition: CVGeom.h:137
virtual QString getName() const
Returns object name.
Definition: ecvObject.h:72
void clear()
Resets the bounding box.
Definition: BoundingBox.h:125
virtual void setTempColor(const ecvColor::Rgb &col, bool autoActivate=true)
Sets current temporary (unique)
Definition: ecvDrawableObject.cpp:74
void removeAllChildren()
Removes all children.
Definition: ecvHObject.cpp:1096
constexpr Rgb red(MAX, 0, 0)
void addPoint(const CCVector3 &P)
Adds a 3D point to the database.
Definition: PointCloudTpl.h:246
@ DP_NONE
Definition: ecvHObject.h:258
Display context.
Definition: ecvDrawContext.h:365
void updateRefMarkers(int index)
Definition: ecvPointPairRegistrationDlg.cpp:1120
Picked item.
Definition: ecvPickingListener.h:26
float PointCoordinateType
Type of the coordinates of a (N-D) point.
Definition: CVTypes.h:16
Definition: ecvPointPairRegistrationDlg.h:30
Type u[3]
Definition: CVGeom.h:139
Generic dialog to query 3 (double) values.
Definition: ecvAskThreeDoubleValuesDlg.h:16
virtual bool addChild(ccHObject *child, int dependencyFlags=DP_PARENT_OF_OTHER, int insertIndex=-1)
Adds a child.
Definition: ecvHObject.cpp:534
static cc2DLabel * CreateLabel(cc2DLabel *label, ccPointCloud *cloud, unsigned pointIndex, QString pointName)
Definition: ecvPointPairRegistrationDlg.cpp:628
void cancel()
Definition: ecvPointPairRegistrationDlg.cpp:1632
virtual void setEnabled(bool state)
Sets the "enabled" property.
Definition: ecvObject.h:102
bool LessThanEpsilon(float x)
Test a floating point number against our epsilon (a very small number).
Definition: CVMath.h:23
static ccGenericPointCloud * ToGenericPointCloud(ccHObject *obj, bool *isLockedVertices=nullptr)
Converts current object to 'equivalent' ccGenericPointCloud.
Definition: ecvHObjectCaster.cpp:81
static Vector3Tpl fromArray(const int a[3])
Constructor from an int array.
Definition: CVGeom.h:268
void removeListener(ccPickingListener *listener, bool autoStopPickingIfLast=true)
Removes a listener.
Definition: ecvPickingHub.cpp:165
ecvMainAppInterface * m_app
Main application interface.
Definition: ecvPointPairRegistrationDlg.h:198
static bool s_lastRefPointisGlobal
Definition: ecvPointPairRegistrationDlg.cpp:460
EntityContexts m_referenceEntities
Reference entity (if any)
Definition: ecvPointPairRegistrationDlg.h:181
void showAlignedEntities(bool)
Slot called to change aligned cloud visibility.
Definition: ecvPointPairRegistrationDlg.cpp:1137
bool callHornRegistration(cloudViewer::PointProjectionTools::Transformation &trans, double &rms, bool autoUpdateTab)
Calls Horn registration (cloudViewer::HornRegistrationTools)
Definition: ecvPointPairRegistrationDlg.cpp:1193
void onItemPicked(const PickedItem &pi) override
Inherited from ccPickingListener.
Definition: ecvPointPairRegistrationDlg.cpp:586
void updateNameIn3DRecursive()
Definition: ecvHObject.cpp:1600
void removeRefPoint(int index, bool autoRemoveDualPoint=true)
Removes a point from the 'reference' set.
Definition: ecvPointPairRegistrationDlg.cpp:1013
QString toString(int precision=12, QChar separator=' ') const
Returns matrix as a string.
Definition: ecvGLMatrixTpl.h:502
QString getViewId() const
Definition: ecvHObject.h:225