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

Dialog for selection of cloud center. More...

#include <ecvShiftAndScaleCloudDlg.h>

Inheritance diagram for ecvShiftAndScaleCloudDlg:
Collaboration diagram for ecvShiftAndScaleCloudDlg:

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::ShiftInfom_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...
 

Detailed Description

Dialog for selection of cloud center.

Definition at line 24 of file ecvShiftAndScaleCloudDlg.h.

Constructor & Destructor Documentation

◆ ecvShiftAndScaleCloudDlg() [1/2]

ecvShiftAndScaleCloudDlg::ecvShiftAndScaleCloudDlg ( const CCVector3d Pg,
double  Dg = 0,
QWidget *  parent = 0 
)

Default constructor.

Parameters
Pga point expressed in the original coordinate system
Dgbounding box diagonal in the original coordinate system (or <= 0 to ignore)
parentparent widget

◆ ecvShiftAndScaleCloudDlg() [2/2]

ecvShiftAndScaleCloudDlg::ecvShiftAndScaleCloudDlg ( const CCVector3d Pl,
double  Dl,
const CCVector3d Pg,
double  Dg,
QWidget *  parent = 0 
)

Reverse mode constructor.

Parameters
Pla point expressed in the local coordinate system
Dlbounding box diagonal in the local coordinate system
Pga point expressed in the original coordinate system
Dgbounding box diagonal in the original coordinate system
parentparent widget

◆ ~ecvShiftAndScaleCloudDlg()

virtual ecvShiftAndScaleCloudDlg::~ecvShiftAndScaleCloudDlg ( )
virtual

Destructor.

Member Function Documentation

◆ addFileInfo()

bool ecvShiftAndScaleCloudDlg::addFileInfo ( )

Adds information from default file (if any)

◆ addShiftInfo() [1/2]

int ecvShiftAndScaleCloudDlg::addShiftInfo ( const ecvGlobalShiftManager::ShiftInfo info)

Adds shift info to the combox.

Parameters
infoshift info
Returns
index in combo-box

◆ addShiftInfo() [2/2]

int ecvShiftAndScaleCloudDlg::addShiftInfo ( const std::vector< ecvGlobalShiftManager::ShiftInfo > &  info)

Adds shift info to the combox.

Parameters
infoshift info
Returns
index in combo-box

◆ applyAll()

bool ecvShiftAndScaleCloudDlg::applyAll ( ) const
inline

Whether shift should be applied to all files.

Definition at line 63 of file ecvShiftAndScaleCloudDlg.h.

◆ cancelled()

bool ecvShiftAndScaleCloudDlg::cancelled ( ) const
inline

Whether the user has clicked on the cancel button or not.

Definition at line 66 of file ecvShiftAndScaleCloudDlg.h.

◆ displayMoreInfo

void ecvShiftAndScaleCloudDlg::displayMoreInfo ( )
protectedslot

Displays more info about global shift mechanism.

◆ getInfo()

bool ecvShiftAndScaleCloudDlg::getInfo ( size_t  index,
ecvGlobalShiftManager::ShiftInfo info 
) const

Returns a given input info.

◆ getScale()

double ecvShiftAndScaleCloudDlg::getScale ( ) const

Returns scale.

◆ getShift()

CCVector3d ecvShiftAndScaleCloudDlg::getShift ( ) const

Returns shift.

◆ infoCount()

size_t ecvShiftAndScaleCloudDlg::infoCount ( ) const
inline

Returns the number of info currently stored.

Definition at line 116 of file ecvShiftAndScaleCloudDlg.h.

◆ init()

void ecvShiftAndScaleCloudDlg::init ( )
protected

Initialization routine.

◆ keepGlobalPos()

bool ecvShiftAndScaleCloudDlg::keepGlobalPos ( ) const

Returns whether the global position should be preserved or not.

◆ loadInfoFromFile()

bool ecvShiftAndScaleCloudDlg::loadInfoFromFile ( QString  filename)
protected

Tries to load ShiftInfo data from a (text) file.

Data is stored in m_defaultInfos.

Parameters
filenamefilename
Returns
success

◆ onClick

void ecvShiftAndScaleCloudDlg::onClick ( QAbstractButton *  button)
protectedslot

Analyzes the clicked button.

◆ onGlobalPosCheckBoxToggled

void ecvShiftAndScaleCloudDlg::onGlobalPosCheckBoxToggled ( bool  )
protectedslot

Slot called when the 'Keep global position' checkbox is toggled.

◆ onLoadIndexChanged

void ecvShiftAndScaleCloudDlg::onLoadIndexChanged ( int  )
protectedslot

Slot called when the 'loadComboBox' index changes.

◆ preserveShiftOnSave()

bool ecvShiftAndScaleCloudDlg::preserveShiftOnSave ( ) const

Returns whether the global shift should be preserved or not.

◆ setCurrentProfile()

void ecvShiftAndScaleCloudDlg::setCurrentProfile ( int  index)

Sets the current combo-box entry (profile)

◆ setKeepGlobalPos()

void ecvShiftAndScaleCloudDlg::setKeepGlobalPos ( bool  state)

Sets whether the global position should be preserved or not.

◆ SetLastInfo()

static void ecvShiftAndScaleCloudDlg::SetLastInfo ( const CCVector3d shift,
double  scale 
)
static

Sets the last shift and scale information.

◆ setPreserveShiftOnSave()

void ecvShiftAndScaleCloudDlg::setPreserveShiftOnSave ( bool  state)

Sets whether the global shift should be preserved or not.

◆ setScale()

void ecvShiftAndScaleCloudDlg::setScale ( double  scale)
protected

Sets displayed scale.

◆ setShift()

void ecvShiftAndScaleCloudDlg::setShift ( const CCVector3d shift)
protected

Sets displayed shift.

◆ setShiftFieldsPrecision()

void ecvShiftAndScaleCloudDlg::setShiftFieldsPrecision ( int  precision)

Sets the Shift fields (X, Y and Z) precision (default should be 2)

◆ showApplyAllButton()

void ecvShiftAndScaleCloudDlg::showApplyAllButton ( bool  state)

Whether to show the 'Apply all' button or not.

◆ showApplyButton()

void ecvShiftAndScaleCloudDlg::showApplyButton ( bool  state)

Whether to show the 'Apply' button or not.

◆ showCancelButton()

void ecvShiftAndScaleCloudDlg::showCancelButton ( bool  state)

Whether to show the 'Cancel' button or not.

◆ showKeepGlobalPosCheckbox()

void ecvShiftAndScaleCloudDlg::showKeepGlobalPosCheckbox ( bool  state)

Whether to show or not the 'Keep global position' checkbox.

◆ showNoButton()

void ecvShiftAndScaleCloudDlg::showNoButton ( bool  state)

Whether to show the 'No' button or not.

◆ showPreserveShiftOnSave()

void ecvShiftAndScaleCloudDlg::showPreserveShiftOnSave ( bool  state)

Whether to show or not the 'Preserve shift on save' checkbox.

◆ showScaleItems()

void ecvShiftAndScaleCloudDlg::showScaleItems ( bool  state)

Whether to show dialog items related to scale.

◆ showTitle()

void ecvShiftAndScaleCloudDlg::showTitle ( bool  state)

Whether to show or not the title.

◆ showWarning()

void ecvShiftAndScaleCloudDlg::showWarning ( bool  state)

Whether to show or not the warning about non pertinent shift information.

◆ updateGlobalAndLocalSystems

void ecvShiftAndScaleCloudDlg::updateGlobalAndLocalSystems ( )
protectedslot

Updates info on the global and local coordinate systems.

◆ updateGlobalSystem()

void ecvShiftAndScaleCloudDlg::updateGlobalSystem ( )
protected

Updates info on the global coordinate system.

◆ updateLocalSystem()

void ecvShiftAndScaleCloudDlg::updateLocalSystem ( )
protected

Updates info on the local coordinate system.

Member Data Documentation

◆ m_activeInfoIndex

int ecvShiftAndScaleCloudDlg::m_activeInfoIndex
protected

Active info entry index.

Definition at line 173 of file ecvShiftAndScaleCloudDlg.h.

◆ m_applyAll

bool ecvShiftAndScaleCloudDlg::m_applyAll
protected

Whether shift should be applied to all files.

Definition at line 166 of file ecvShiftAndScaleCloudDlg.h.

◆ m_cancel

bool ecvShiftAndScaleCloudDlg::m_cancel
protected

Whether the user has clicked on Cancel or not.

Definition at line 168 of file ecvShiftAndScaleCloudDlg.h.

◆ m_defaultInfos

std::vector<ecvGlobalShiftManager::ShiftInfo> ecvShiftAndScaleCloudDlg::m_defaultInfos
protected

Default infos (typically loaded from the global_shift_list.txt' file)

Definition at line 171 of file ecvShiftAndScaleCloudDlg.h.

◆ m_localDiagonal

double ecvShiftAndScaleCloudDlg::m_localDiagonal
protected

Local coordinate system diagonal (reversed mode only)

Definition at line 182 of file ecvShiftAndScaleCloudDlg.h.

◆ m_localPoint

CCVector3d ecvShiftAndScaleCloudDlg::m_localPoint
protected

Local coordinate system point (reversed mode only)

Definition at line 180 of file ecvShiftAndScaleCloudDlg.h.

◆ m_originalDiagonal

double ecvShiftAndScaleCloudDlg::m_originalDiagonal
protected

Original coordinate system diagonal.

Definition at line 178 of file ecvShiftAndScaleCloudDlg.h.

◆ m_originalPoint

CCVector3d ecvShiftAndScaleCloudDlg::m_originalPoint
protected

Original coordinate system point.

Definition at line 176 of file ecvShiftAndScaleCloudDlg.h.

◆ m_reversedMode

bool ecvShiftAndScaleCloudDlg::m_reversedMode
protected

Whether the reverse mode is active or not.

Definition at line 185 of file ecvShiftAndScaleCloudDlg.h.

◆ m_ui

Ui_GlobalShiftAndScaleDlg* ecvShiftAndScaleCloudDlg::m_ui
protected

Associated UI.

Definition at line 163 of file ecvShiftAndScaleCloudDlg.h.


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