![]() |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
Dialog for selection of cloud center. More...
#include <ecvShiftAndScaleCloudDlg.h>


Public Member Functions | |
| ecvShiftAndScaleCloudDlg (const CCVector3d &Pg, double Dg=0, QWidget *parent=0) | |
| Default constructor. More... | |
| ecvShiftAndScaleCloudDlg (const CCVector3d &Pl, double Dl, const CCVector3d &Pg, double Dg, QWidget *parent=0) | |
| Reverse mode constructor. More... | |
| void | setShiftFieldsPrecision (int precision) |
| Sets the Shift fields (X, Y and Z) precision (default should be 2) More... | |
| virtual | ~ecvShiftAndScaleCloudDlg () |
| Destructor. More... | |
| CCVector3d | getShift () const |
| Returns shift. More... | |
| double | getScale () const |
| Returns scale. More... | |
| bool | applyAll () const |
| Whether shift should be applied to all files. More... | |
| bool | cancelled () const |
| Whether the user has clicked on the cancel button or not. More... | |
| void | showScaleItems (bool state) |
| Whether to show dialog items related to scale. More... | |
| void | showApplyAllButton (bool state) |
| Whether to show the 'Apply all' button or not. More... | |
| void | showApplyButton (bool state) |
| Whether to show the 'Apply' button or not. More... | |
| void | showNoButton (bool state) |
| Whether to show the 'No' button or not. More... | |
| void | showCancelButton (bool state) |
| Whether to show the 'Cancel' button or not. More... | |
| void | showWarning (bool state) |
| Whether to show or not the warning about non pertinent shift information. More... | |
| void | showTitle (bool state) |
| Whether to show or not the title. More... | |
| void | showKeepGlobalPosCheckbox (bool state) |
| Whether to show or not the 'Keep global position' checkbox. More... | |
| bool | keepGlobalPos () const |
| Returns whether the global position should be preserved or not. More... | |
| void | setKeepGlobalPos (bool state) |
| Sets whether the global position should be preserved or not. More... | |
| void | showPreserveShiftOnSave (bool state) |
| Whether to show or not the 'Preserve shift on save' checkbox. More... | |
| bool | preserveShiftOnSave () const |
| Returns whether the global shift should be preserved or not. More... | |
| void | setPreserveShiftOnSave (bool state) |
| Sets whether the global shift should be preserved or not. More... | |
| int | addShiftInfo (const ecvGlobalShiftManager::ShiftInfo &info) |
| Adds shift info to the combox. More... | |
| int | addShiftInfo (const std::vector< ecvGlobalShiftManager::ShiftInfo > &info) |
| Adds shift info to the combox. More... | |
| bool | getInfo (size_t index, ecvGlobalShiftManager::ShiftInfo &info) const |
| Returns a given input info. More... | |
| size_t | infoCount () const |
| Returns the number of info currently stored. More... | |
| void | setCurrentProfile (int index) |
| Sets the current combo-box entry (profile) More... | |
| bool | addFileInfo () |
| Adds information from default file (if any) More... | |
Static Public Member Functions | |
| static void | SetLastInfo (const CCVector3d &shift, double scale) |
| Sets the last shift and scale information. More... | |
Protected Slots | |
| void | onLoadIndexChanged (int) |
| Slot called when the 'loadComboBox' index changes. More... | |
| void | onGlobalPosCheckBoxToggled (bool) |
| Slot called when the 'Keep global position' checkbox is toggled. More... | |
| void | onClick (QAbstractButton *button) |
| Analyzes the clicked button. More... | |
| void | updateGlobalAndLocalSystems () |
| Updates info on the global and local coordinate systems. More... | |
| void | displayMoreInfo () |
| Displays more info about global shift mechanism. More... | |
Protected Member Functions | |
| void | init () |
| Initialization routine. More... | |
| void | setShift (const CCVector3d &shift) |
| Sets displayed shift. More... | |
| void | setScale (double scale) |
| Sets displayed scale. More... | |
| void | updateLocalSystem () |
| Updates info on the local coordinate system. More... | |
| void | updateGlobalSystem () |
| Updates info on the global coordinate system. More... | |
| bool | loadInfoFromFile (QString filename) |
| Tries to load ShiftInfo data from a (text) file. More... | |
Protected Attributes | |
| Ui_GlobalShiftAndScaleDlg * | m_ui |
| Associated UI. More... | |
| bool | m_applyAll |
| Whether shift should be applied to all files. More... | |
| bool | m_cancel |
| Whether the user has clicked on Cancel or not. More... | |
| std::vector< ecvGlobalShiftManager::ShiftInfo > | m_defaultInfos |
| Default infos (typically loaded from the global_shift_list.txt' file) More... | |
| int | m_activeInfoIndex |
| Active info entry index. More... | |
| CCVector3d | m_originalPoint |
| Original coordinate system point. More... | |
| double | m_originalDiagonal |
| Original coordinate system diagonal. More... | |
| CCVector3d | m_localPoint |
| Local coordinate system point (reversed mode only) More... | |
| double | m_localDiagonal |
| Local coordinate system diagonal (reversed mode only) More... | |
| bool | m_reversedMode |
| Whether the reverse mode is active or not. More... | |
Dialog for selection of cloud center.
Definition at line 24 of file ecvShiftAndScaleCloudDlg.h.
| ecvShiftAndScaleCloudDlg::ecvShiftAndScaleCloudDlg | ( | const CCVector3d & | Pg, |
| double | Dg = 0, |
||
| QWidget * | parent = 0 |
||
| ) |
Default constructor.
| Pg | a point expressed in the original coordinate system |
| Dg | bounding box diagonal in the original coordinate system (or <= 0 to ignore) |
| parent | parent widget |
Definition at line 38 of file ecvShiftAndScaleCloudDlg.cpp.
References init(), m_originalDiagonal, showCancelButton(), showKeepGlobalPosCheckbox(), showPreserveShiftOnSave(), showScaleItems(), and showWarning().
| ecvShiftAndScaleCloudDlg::ecvShiftAndScaleCloudDlg | ( | const CCVector3d & | Pl, |
| double | Dl, | ||
| const CCVector3d & | Pg, | ||
| double | Dg, | ||
| QWidget * | parent = 0 |
||
| ) |
Reverse mode constructor.
| Pl | a point expressed in the local coordinate system |
| Dl | bounding box diagonal in the local coordinate system |
| Pg | a point expressed in the original coordinate system |
| Dg | bounding box diagonal in the original coordinate system |
| parent | parent widget |
Definition at line 60 of file ecvShiftAndScaleCloudDlg.cpp.
References init(), m_localDiagonal, m_originalDiagonal, m_ui, onGlobalPosCheckBoxToggled(), showCancelButton(), showKeepGlobalPosCheckbox(), showPreserveShiftOnSave(), showScaleItems(), showTitle(), and showWarning().
|
virtual |
| bool ecvShiftAndScaleCloudDlg::addFileInfo | ( | ) |
Adds information from default file (if any)
Definition at line 145 of file ecvShiftAndScaleCloudDlg.cpp.
References loadInfoFromFile(), and s_defaultGlobalShiftListFilename().
Referenced by ecvGlobalShiftManager::Handle().
| int ecvShiftAndScaleCloudDlg::addShiftInfo | ( | const ecvGlobalShiftManager::ShiftInfo & | info | ) |
Adds shift info to the combox.
| info | shift info |
Definition at line 418 of file ecvShiftAndScaleCloudDlg.cpp.
References m_defaultInfos, and m_ui.
Referenced by addShiftInfo(), and ecvGlobalShiftManager::Handle().
| int ecvShiftAndScaleCloudDlg::addShiftInfo | ( | const std::vector< ecvGlobalShiftManager::ShiftInfo > & | info | ) |
Adds shift info to the combox.
| info | shift info |
Definition at line 433 of file ecvShiftAndScaleCloudDlg.cpp.
References addShiftInfo(), and m_defaultInfos.
|
inline |
Whether shift should be applied to all files.
Definition at line 63 of file ecvShiftAndScaleCloudDlg.h.
Referenced by ecvGlobalShiftManager::Handle().
|
inline |
Whether the user has clicked on the cancel button or not.
Definition at line 66 of file ecvShiftAndScaleCloudDlg.h.
|
protectedslot |
Displays more info about global shift mechanism.
Definition at line 137 of file ecvShiftAndScaleCloudDlg.cpp.
Referenced by init().
| bool ecvShiftAndScaleCloudDlg::getInfo | ( | size_t | index, |
| ecvGlobalShiftManager::ShiftInfo & | info | ||
| ) | const |
Returns a given input info.
Definition at line 403 of file ecvShiftAndScaleCloudDlg.cpp.
References m_defaultInfos.
Referenced by ecvGlobalShiftManager::Handle().
| double ecvShiftAndScaleCloudDlg::getScale | ( | ) | const |
Returns scale.
Definition at line 323 of file ecvShiftAndScaleCloudDlg.cpp.
References m_ui.
Referenced by ecvGlobalShiftManager::Handle(), updateGlobalSystem(), and updateLocalSystem().
| CCVector3d ecvShiftAndScaleCloudDlg::getShift | ( | ) | const |
Returns shift.
Definition at line 314 of file ecvShiftAndScaleCloudDlg.cpp.
References m_ui.
Referenced by ecvGlobalShiftManager::Handle(), updateGlobalSystem(), and updateLocalSystem().
|
inline |
Returns the number of info currently stored.
Definition at line 116 of file ecvShiftAndScaleCloudDlg.h.
Referenced by ecvGlobalShiftManager::Handle().
|
protected |
Initialization routine.
Definition at line 101 of file ecvShiftAndScaleCloudDlg.cpp.
References displayMoreInfo(), m_ui, onClick(), onGlobalPosCheckBoxToggled(), onLoadIndexChanged(), and updateGlobalAndLocalSystems().
Referenced by ecvShiftAndScaleCloudDlg().
| bool ecvShiftAndScaleCloudDlg::keepGlobalPos | ( | ) | const |
Returns whether the global position should be preserved or not.
Definition at line 373 of file ecvShiftAndScaleCloudDlg.cpp.
References m_ui.
Referenced by updateGlobalSystem(), and updateLocalSystem().
|
protected |
Tries to load ShiftInfo data from a (text) file.
Data is stored in m_defaultInfos.
| filename | filename |
Definition at line 151 of file ecvShiftAndScaleCloudDlg.cpp.
References filename, m_defaultInfos, m_ui, name, ecvGlobalShiftManager::ShiftInfo::name, ecvGlobalShiftManager::ShiftInfo::scale, ecvGlobalShiftManager::ShiftInfo::shift, QtCompat::SkipEmptyParts, CVLog::Warning(), Tuple3Tpl< Type >::x, Tuple3Tpl< Type >::y, and Tuple3Tpl< Type >::z.
Referenced by addFileInfo().
|
protectedslot |
Analyzes the clicked button.
Definition at line 390 of file ecvShiftAndScaleCloudDlg.cpp.
References m_applyAll, m_cancel, and m_ui.
Referenced by init().
|
protectedslot |
Slot called when the 'Keep global position' checkbox is toggled.
Definition at line 381 of file ecvShiftAndScaleCloudDlg.cpp.
References m_ui, updateGlobalSystem(), and updateLocalSystem().
Referenced by ecvShiftAndScaleCloudDlg(), and init().
|
protectedslot |
Slot called when the 'loadComboBox' index changes.
Definition at line 396 of file ecvShiftAndScaleCloudDlg.cpp.
References m_defaultInfos, m_ui, setScale(), and setShift().
Referenced by init().
| bool ecvShiftAndScaleCloudDlg::preserveShiftOnSave | ( | ) | const |
Returns whether the global shift should be preserved or not.
Definition at line 365 of file ecvShiftAndScaleCloudDlg.cpp.
References m_ui.
Referenced by ecvGlobalShiftManager::Handle().
| void ecvShiftAndScaleCloudDlg::setCurrentProfile | ( | int | index | ) |
Sets the current combo-box entry (profile)
Definition at line 412 of file ecvShiftAndScaleCloudDlg.cpp.
References m_defaultInfos, and m_ui.
Referenced by ecvGlobalShiftManager::Handle().
| void ecvShiftAndScaleCloudDlg::setKeepGlobalPos | ( | bool | state | ) |
Sets whether the global position should be preserved or not.
Definition at line 377 of file ecvShiftAndScaleCloudDlg.cpp.
References m_ui.
|
static |
Sets the last shift and scale information.
| void ecvShiftAndScaleCloudDlg::setPreserveShiftOnSave | ( | bool | state | ) |
Sets whether the global shift should be preserved or not.
Definition at line 369 of file ecvShiftAndScaleCloudDlg.cpp.
References m_ui.
Referenced by ecvGlobalShiftManager::Handle().
|
protected |
Sets displayed scale.
Definition at line 319 of file ecvShiftAndScaleCloudDlg.cpp.
References m_ui.
Referenced by onLoadIndexChanged().
|
protected |
Sets displayed shift.
Definition at line 308 of file ecvShiftAndScaleCloudDlg.cpp.
References m_ui, Tuple3Tpl< Type >::x, Tuple3Tpl< Type >::y, and Tuple3Tpl< Type >::z.
Referenced by onLoadIndexChanged().
| void ecvShiftAndScaleCloudDlg::setShiftFieldsPrecision | ( | int | precision | ) |
Sets the Shift fields (X, Y and Z) precision (default should be 2)
Definition at line 95 of file ecvShiftAndScaleCloudDlg.cpp.
References m_ui.
| void ecvShiftAndScaleCloudDlg::showApplyAllButton | ( | bool | state | ) |
Whether to show the 'Apply all' button or not.
Definition at line 333 of file ecvShiftAndScaleCloudDlg.cpp.
References m_ui.
Referenced by ecvGlobalShiftManager::Handle().
| void ecvShiftAndScaleCloudDlg::showApplyButton | ( | bool | state | ) |
Whether to show the 'Apply' button or not.
Definition at line 337 of file ecvShiftAndScaleCloudDlg.cpp.
References m_ui.
| void ecvShiftAndScaleCloudDlg::showCancelButton | ( | bool | state | ) |
Whether to show the 'Cancel' button or not.
Definition at line 345 of file ecvShiftAndScaleCloudDlg.cpp.
References m_ui.
Referenced by ecvShiftAndScaleCloudDlg().
| void ecvShiftAndScaleCloudDlg::showKeepGlobalPosCheckbox | ( | bool | state | ) |
Whether to show or not the 'Keep global position' checkbox.
Definition at line 357 of file ecvShiftAndScaleCloudDlg.cpp.
References m_ui.
Referenced by ecvShiftAndScaleCloudDlg().
| void ecvShiftAndScaleCloudDlg::showNoButton | ( | bool | state | ) |
Whether to show the 'No' button or not.
Definition at line 341 of file ecvShiftAndScaleCloudDlg.cpp.
References m_ui.
| void ecvShiftAndScaleCloudDlg::showPreserveShiftOnSave | ( | bool | state | ) |
Whether to show or not the 'Preserve shift on save' checkbox.
Definition at line 361 of file ecvShiftAndScaleCloudDlg.cpp.
References m_ui.
Referenced by ecvShiftAndScaleCloudDlg(), and ecvGlobalShiftManager::Handle().
| void ecvShiftAndScaleCloudDlg::showScaleItems | ( | bool | state | ) |
Whether to show dialog items related to scale.
Definition at line 327 of file ecvShiftAndScaleCloudDlg.cpp.
References m_ui.
Referenced by ecvShiftAndScaleCloudDlg(), and ecvGlobalShiftManager::Handle().
| void ecvShiftAndScaleCloudDlg::showTitle | ( | bool | state | ) |
Whether to show or not the title.
Definition at line 353 of file ecvShiftAndScaleCloudDlg.cpp.
References m_ui.
Referenced by ecvShiftAndScaleCloudDlg(), and ecvGlobalShiftManager::Handle().
| void ecvShiftAndScaleCloudDlg::showWarning | ( | bool | state | ) |
Whether to show or not the warning about non pertinent shift information.
Definition at line 349 of file ecvShiftAndScaleCloudDlg.cpp.
References m_ui.
Referenced by ecvShiftAndScaleCloudDlg(), and ecvGlobalShiftManager::Handle().
|
protectedslot |
Updates info on the global and local coordinate systems.
Definition at line 228 of file ecvShiftAndScaleCloudDlg.cpp.
References updateGlobalSystem(), and updateLocalSystem().
Referenced by init().
|
protected |
Updates info on the global coordinate system.
Definition at line 240 of file ecvShiftAndScaleCloudDlg.cpp.
References AlmostEq(), getScale(), getShift(), keepGlobalPos(), m_localDiagonal, m_localPoint, m_originalDiagonal, m_originalPoint, m_reversedMode, m_ui, Tuple3Tpl< Type >::x, Tuple3Tpl< Type >::y, and Tuple3Tpl< Type >::z.
Referenced by onGlobalPosCheckBoxToggled(), and updateGlobalAndLocalSystems().
|
protected |
Updates info on the local coordinate system.
Definition at line 267 of file ecvShiftAndScaleCloudDlg.cpp.
References cloudViewer::utility::floor(), getScale(), getShift(), keepGlobalPos(), m_localDiagonal, m_localPoint, m_originalDiagonal, m_originalPoint, m_reversedMode, m_ui, ecvGlobalShiftManager::NeedRescale(), ecvGlobalShiftManager::NeedShift(), Tuple3Tpl< Type >::x, Tuple3Tpl< Type >::y, and Tuple3Tpl< Type >::z.
Referenced by onGlobalPosCheckBoxToggled(), and updateGlobalAndLocalSystems().
|
protected |
Active info entry index.
Definition at line 173 of file ecvShiftAndScaleCloudDlg.h.
|
protected |
Whether shift should be applied to all files.
Definition at line 166 of file ecvShiftAndScaleCloudDlg.h.
Referenced by onClick().
|
protected |
Whether the user has clicked on Cancel or not.
Definition at line 168 of file ecvShiftAndScaleCloudDlg.h.
Referenced by onClick().
|
protected |
Default infos (typically loaded from the global_shift_list.txt' file)
Definition at line 171 of file ecvShiftAndScaleCloudDlg.h.
Referenced by addShiftInfo(), getInfo(), loadInfoFromFile(), onLoadIndexChanged(), and setCurrentProfile().
|
protected |
Local coordinate system diagonal (reversed mode only)
Definition at line 182 of file ecvShiftAndScaleCloudDlg.h.
Referenced by ecvShiftAndScaleCloudDlg(), updateGlobalSystem(), and updateLocalSystem().
|
protected |
Local coordinate system point (reversed mode only)
Definition at line 180 of file ecvShiftAndScaleCloudDlg.h.
Referenced by updateGlobalSystem(), and updateLocalSystem().
|
protected |
Original coordinate system diagonal.
Definition at line 178 of file ecvShiftAndScaleCloudDlg.h.
Referenced by ecvShiftAndScaleCloudDlg(), updateGlobalSystem(), and updateLocalSystem().
|
protected |
Original coordinate system point.
Definition at line 176 of file ecvShiftAndScaleCloudDlg.h.
Referenced by updateGlobalSystem(), and updateLocalSystem().
|
protected |
Whether the reverse mode is active or not.
Definition at line 185 of file ecvShiftAndScaleCloudDlg.h.
Referenced by updateGlobalSystem(), and updateLocalSystem().
|
protected |
Associated UI.
Definition at line 163 of file ecvShiftAndScaleCloudDlg.h.
Referenced by addShiftInfo(), ecvShiftAndScaleCloudDlg(), getScale(), getShift(), init(), keepGlobalPos(), loadInfoFromFile(), onClick(), onGlobalPosCheckBoxToggled(), onLoadIndexChanged(), preserveShiftOnSave(), setCurrentProfile(), setKeepGlobalPos(), setPreserveShiftOnSave(), setScale(), setShift(), setShiftFieldsPrecision(), showApplyAllButton(), showApplyButton(), showCancelButton(), showKeepGlobalPosCheckbox(), showNoButton(), showPreserveShiftOnSave(), showScaleItems(), showTitle(), showWarning(), updateGlobalSystem(), updateLocalSystem(), and ~ecvShiftAndScaleCloudDlg().