![]() |
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.
| 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 |
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 |
References init(), m_localDiagonal, m_originalDiagonal, m_ui, onGlobalPosCheckBoxToggled(), showCancelButton(), showKeepGlobalPosCheckbox(), showPreserveShiftOnSave(), showScaleItems(), showTitle(), and showWarning().
|
virtual |
Destructor.
References m_ui.
| bool ecvShiftAndScaleCloudDlg::addFileInfo | ( | ) |
Adds information from default file (if any)
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 |
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 |
References addShiftInfo(), and m_defaultInfos.
|
inline |
Whether shift should be applied to all files.
Referenced by ecvGlobalShiftManager::Handle().
|
inline |
Whether the user has clicked on the cancel button or not.
|
protectedslot |
Displays more info about global shift mechanism.
Referenced by init().
| bool ecvShiftAndScaleCloudDlg::getInfo | ( | size_t | index, |
| ecvGlobalShiftManager::ShiftInfo & | info | ||
| ) | const |
Returns a given input info.
References m_defaultInfos.
Referenced by ecvGlobalShiftManager::Handle().
| double ecvShiftAndScaleCloudDlg::getScale | ( | ) | const |
Returns scale.
References m_ui.
Referenced by ecvGlobalShiftManager::Handle(), updateGlobalSystem(), and updateLocalSystem().
| CCVector3d ecvShiftAndScaleCloudDlg::getShift | ( | ) | const |
Returns shift.
References m_ui.
Referenced by ecvGlobalShiftManager::Handle(), updateGlobalSystem(), and updateLocalSystem().
|
inline |
Returns the number of info currently stored.
Referenced by ecvGlobalShiftManager::Handle().
|
protected |
Initialization routine.
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.
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 |
References filename, m_defaultInfos, m_ui, ecvGlobalShiftManager::ShiftInfo::name, 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 |
|
protectedslot |
Slot called when the 'Keep global position' checkbox is toggled.
References m_ui, updateGlobalSystem(), and updateLocalSystem().
Referenced by ecvShiftAndScaleCloudDlg(), and init().
|
protectedslot |
Slot called when the 'loadComboBox' index changes.
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.
References m_ui.
Referenced by ecvGlobalShiftManager::Handle().
| void ecvShiftAndScaleCloudDlg::setCurrentProfile | ( | int | index | ) |
Sets the current combo-box entry (profile)
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.
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.
References m_ui.
Referenced by ecvGlobalShiftManager::Handle().
|
protected |
|
protected |
Sets displayed shift.
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)
References m_ui.
| void ecvShiftAndScaleCloudDlg::showApplyAllButton | ( | bool | state | ) |
Whether to show the 'Apply all' button or not.
References m_ui.
Referenced by ecvGlobalShiftManager::Handle().
| void ecvShiftAndScaleCloudDlg::showApplyButton | ( | bool | state | ) |
Whether to show the 'Apply' button or not.
References m_ui.
| void ecvShiftAndScaleCloudDlg::showCancelButton | ( | bool | state | ) |
Whether to show the 'Cancel' button or not.
References m_ui.
Referenced by ecvShiftAndScaleCloudDlg().
| void ecvShiftAndScaleCloudDlg::showKeepGlobalPosCheckbox | ( | bool | state | ) |
Whether to show or not the 'Keep global position' checkbox.
References m_ui.
Referenced by ecvShiftAndScaleCloudDlg().
| void ecvShiftAndScaleCloudDlg::showNoButton | ( | bool | state | ) |
Whether to show the 'No' button or not.
References m_ui.
| void ecvShiftAndScaleCloudDlg::showPreserveShiftOnSave | ( | bool | state | ) |
Whether to show or not the 'Preserve shift on save' checkbox.
References m_ui.
Referenced by ecvShiftAndScaleCloudDlg(), and ecvGlobalShiftManager::Handle().
| void ecvShiftAndScaleCloudDlg::showScaleItems | ( | bool | state | ) |
Whether to show dialog items related to scale.
References m_ui.
Referenced by ecvShiftAndScaleCloudDlg(), and ecvGlobalShiftManager::Handle().
| void ecvShiftAndScaleCloudDlg::showTitle | ( | bool | state | ) |
Whether to show or not the title.
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.
References m_ui.
Referenced by ecvShiftAndScaleCloudDlg(), and ecvGlobalShiftManager::Handle().
|
protectedslot |
Updates info on the global and local coordinate systems.
References updateGlobalSystem(), and updateLocalSystem().
Referenced by init().
|
protected |
Updates info on the global coordinate system.
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.
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.
|
protected |
Whether shift should be applied to all files.
Referenced by onClick().
|
protected |
Whether the user has clicked on Cancel or not.
Referenced by onClick().
|
protected |
Default infos (typically loaded from the global_shift_list.txt' file)
Referenced by addShiftInfo(), getInfo(), loadInfoFromFile(), onLoadIndexChanged(), and setCurrentProfile().
|
protected |
Local coordinate system diagonal (reversed mode only)
Referenced by ecvShiftAndScaleCloudDlg(), updateGlobalSystem(), and updateLocalSystem().
|
protected |
Local coordinate system point (reversed mode only)
Referenced by updateGlobalSystem(), and updateLocalSystem().
|
protected |
Original coordinate system diagonal.
Referenced by ecvShiftAndScaleCloudDlg(), updateGlobalSystem(), and updateLocalSystem().
|
protected |
Original coordinate system point.
Referenced by updateGlobalSystem(), and updateLocalSystem().
|
protected |
Whether the reverse mode is active or not.
Referenced by updateGlobalSystem(), and updateLocalSystem().
|
protected |
Associated UI.
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().