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

Dialog for generating a distance map (surface of revolution) More...

#include <distanceMapGenerationDlg.h>

Inheritance diagram for DistanceMapGenerationDlg:
Collaboration diagram for DistanceMapGenerationDlg:

Public Types

enum  ANGULAR_UNIT { ANG_DEG , ANG_RAD , ANG_GRAD }
 Angular units. More...
 
enum  ProjectionMode { PROJ_CYLINDRICAL , PROJ_CONICAL }
 Projection mode. More...
 

Public Member Functions

 DistanceMapGenerationDlg (ccPointCloud *cloud, ccScalarField *sf, ccPolyline *polyline, ecvMainAppInterface *app=0)
 Default constructor. More...
 
virtual ~DistanceMapGenerationDlg ()
 Default destructor. More...
 
ANGULAR_UNIT getAngularUnit () const
 Returns selected angular unit. More...
 
QString getAngularUnitString () const
 Returns selected angular unit as a string. More...
 
QString getCondensedAngularUnitString () const
 Returns selected angular unit as a condensed string. More...
 
QString getHeightUnitString () const
 Returns height unit. More...
 
DistanceMapGenerationTool::FillStrategyType getFillingStrategy () const
 Returns the grid filling strategy. More...
 
DistanceMapGenerationTool::EmptyCellFillOption getEmptyCellFillingOption () const
 Returns the empty cells filling option. More...
 
ProjectionMode getProjectionMode () const
 Returns current projection mode. More...
 
void getGridXValues (double &minX, double &maxX, double &step, ANGULAR_UNIT unit=ANG_RAD) const
 Returns the current 'X' parameters. More...
 
void getGridYValues (double &minY, double &maxY, double &step, ANGULAR_UNIT unit=ANG_RAD) const
 Returns the current 'Y' parameters. More...
 
double getScaleYStep (ANGULAR_UNIT unit=ANG_RAD) const
 Returns scale 'Y' step (current unit) More...
 

Protected Slots

void projectionModeChanged (int)
 
void angularUnitChanged (int)
 
void updateGridSteps ()
 
void updateProfileRevolDim (int)
 
void updateProfileOrigin ()
 
void colorScaleChanged (int)
 
void spawnColorScaleEditor ()
 
void updateHeightUnits ()
 
void exportMapAsCloud ()
 
void exportMapAsMesh ()
 
void exportMapAsGrid ()
 
void exportMapAsImage ()
 
void exportProfilesAsDXF ()
 
void loadOverlaySymbols ()
 
void clearOverlaySymbols ()
 
void overlaySymbolsSizeChanged (int)
 
void overlaySymbolsColorChanged ()
 
void overlayGridColorChanged ()
 
void labelFontSizeChanged (int)
 
void labelPrecisionChanged (int)
 
void baseRadiusChanged (double)
 
void colorRampStepsChanged (int)
 
void toggleOverlayGrid (bool)
 
void changeGridColor ()
 
void changeSymbolColor ()
 
void toggleColorScaleDisplay (bool)
 
void updateVolumes ()
 
void updateOverlayGrid ()
 Updates overlat grid (if any) More...
 
void update ()
 Updates map (and display) More...
 

Protected Member Functions

QSharedPointer< DistanceMapGenerationTool::MapupdateMap ()
 Updates internal map. More...
 
void updateMapTexture ()
 Updates internal map texture (if any) More...
 
void updateZoom (ccBBox &box)
 Updates 2D view zoom. More...
 
void clearView ()
 Clears the 3D view. More...
 
double getBaseRadius () const
 Returns currently applicable base radius. More...
 
double getSpinboxAngularValue (QDoubleSpinBox *spinBox, DistanceMapGenerationDlg::ANGULAR_UNIT unit) const
 Returns the angle in a particular spinbox in the specified units. More...
 
void initFromPersistentSettings ()
 Loads parameters from persistent settings. More...
 
void saveToPersistentSettings ()
 Saves parameters to persistent settings. More...
 
void updateMinAndMaxLimits ()
 Updates the min and max limits (fields) More...
 

Protected Attributes

ecvMainAppInterfacem_app
 Application interface. More...
 
ccPointCloudm_cloud
 Associated cloud. More...
 
ccPolylinem_profile
 Associated profile. More...
 
ccScalarFieldm_sf
 Associated scalar field. More...
 
QSharedPointer< DistanceMapGenerationTool::Mapm_map
 Internal map structure. More...
 
ANGULAR_UNIT m_angularUnits
 Current angular units. More...
 
ccMapWindowm_window
 2D display More...
 
ccColorScaleSelectorm_colorScaleSelector
 Color scale selector. More...
 
ccSymbolCloudm_xLabels
 X labels. More...
 
ccSymbolCloudm_yLabels
 Y labels. More...
 
QColor m_gridColor
 Grid color. More...
 
QColor m_symbolColor
 Symbols color. More...
 

Detailed Description

Dialog for generating a distance map (surface of revolution)

Definition at line 35 of file distanceMapGenerationDlg.h.

Member Enumeration Documentation

◆ ANGULAR_UNIT

Angular units.

Enumerator
ANG_DEG 
ANG_RAD 
ANG_GRAD 

Definition at line 50 of file distanceMapGenerationDlg.h.

◆ ProjectionMode

Projection mode.

Enumerator
PROJ_CYLINDRICAL 
PROJ_CONICAL 

Definition at line 70 of file distanceMapGenerationDlg.h.

Constructor & Destructor Documentation

◆ DistanceMapGenerationDlg()

DistanceMapGenerationDlg::DistanceMapGenerationDlg ( ccPointCloud cloud,
ccScalarField sf,
ccPolyline polyline,
ecvMainAppInterface app = 0 
)

Default constructor.

Definition at line 94 of file distanceMapGenerationDlg.cpp.

References ecvDisplayTools::AddToOwnDB(), ecvGenericDisplayTools::ALIGN_HMIDDLE, ecvGenericDisplayTools::ALIGN_HRIGHT, ecvGenericDisplayTools::ALIGN_VBOTTOM, ecvGenericDisplayTools::ALIGN_VMIDDLE, angularUnitChanged(), baseRadiusChanged(), ecvColor::black(), changeGridColor(), changeSymbolColor(), clearOverlaySymbols(), colorRampStepsChanged(), colorScaleChanged(), DEFAULT_LABEL_MARGIN, ecvDisplayTools::DisplayOverlayEntities(), ecvMainAppInterface::dispToConsole(), ecvMainAppInterface::ERR_CONSOLE_MESSAGE, exportMapAsCloud(), exportMapAsGrid(), exportMapAsImage(), exportMapAsMesh(), exportProfilesAsDXF(), ccScalarField::getColorScale(), ecvMainAppInterface::getColorScalesManager(), ccColorScalesManager::GetDefaultScale(), ecvDisplayTools::GetDisplayParameters(), ccGenericPointCloud::getOwnBB(), DistanceMapGenerationTool::GetPoylineMetaData(), ccColorScaleSelector::init(), initFromPersistentSettings(), ecvDisplayTools::INTERACT_CLICKABLE_ITEMS, ecvDisplayTools::INTERACT_PAN, ecvDisplayTools::INTERACT_ZOOM_CAMERA, DxfProfilesExporter::IsEnabled(), cloudViewer::BoundingBoxTpl< T >::isValid(), labelFontSizeChanged(), labelPrecisionChanged(), loadOverlaySymbols(), m_angularUnits, m_app, m_cloud, m_colorScaleSelector, m_profile, m_sf, m_window, m_xLabels, m_yLabels, ccColorScale::MAX_STEPS, cloudViewer::BoundingBoxTpl< T >::maxCorner(), ccColorScale::MIN_STEPS, cloudViewer::BoundingBoxTpl< T >::minCorner(), DistanceMapGenerationTool::ProfileMetaData::origin, overlayGridColorChanged(), overlaySymbolsColorChanged(), overlaySymbolsSizeChanged(), params, projectionModeChanged(), DistanceMapGenerationTool::ProfileMetaData::revolDim, ecvDisplayTools::SetDisplayParameters(), ecvDisplayTools::SetInteractionMode(), ccSymbolCloud::setLabelAlignmentFlags(), ecvDisplayTools::SetPerspectiveState(), ccColorScaleSelector::setSelectedScale(), ccSymbolCloud::setSymbolSize(), ccMapWindow::showSF(), ccSymbolCloud::showSymbols(), spawnColorScaleEditor(), toggleColorScaleDisplay(), toggleOverlayGrid(), Tuple3Tpl< Type >::u, update(), updateGridSteps(), updateHeightUnits(), updateMinAndMaxLimits(), updateOverlayGrid(), updateProfileOrigin(), updateProfileRevolDim(), updateVolumes(), ecvColor::white(), Tuple3Tpl< Type >::x, XLABEL_CLOUD_NAME, Tuple3Tpl< Type >::y, YLABEL_CLOUD_NAME, and Tuple3Tpl< Type >::z.

◆ ~DistanceMapGenerationDlg()

DistanceMapGenerationDlg::~DistanceMapGenerationDlg ( )
virtual

Default destructor.

Definition at line 341 of file distanceMapGenerationDlg.cpp.

Member Function Documentation

◆ angularUnitChanged

void DistanceMapGenerationDlg::angularUnitChanged ( int  index)
protectedslot

◆ baseRadiusChanged

void DistanceMapGenerationDlg::baseRadiusChanged ( double  )
protectedslot

◆ changeGridColor

void DistanceMapGenerationDlg::changeGridColor ( )
protectedslot

Definition at line 1914 of file distanceMapGenerationDlg.cpp.

References m_gridColor, and overlayGridColorChanged().

Referenced by DistanceMapGenerationDlg().

◆ changeSymbolColor

void DistanceMapGenerationDlg::changeSymbolColor ( )
protectedslot

Definition at line 1923 of file distanceMapGenerationDlg.cpp.

References m_symbolColor, and overlaySymbolsColorChanged().

Referenced by DistanceMapGenerationDlg().

◆ clearOverlaySymbols

◆ clearView()

◆ colorRampStepsChanged

void DistanceMapGenerationDlg::colorRampStepsChanged ( int  )
protectedslot

Definition at line 1694 of file distanceMapGenerationDlg.cpp.

References colorScaleChanged().

Referenced by DistanceMapGenerationDlg().

◆ colorScaleChanged

◆ exportMapAsCloud

◆ exportMapAsGrid

◆ exportMapAsImage

◆ exportMapAsMesh

◆ exportProfilesAsDXF

◆ getAngularUnit()

DistanceMapGenerationDlg::ANGULAR_UNIT DistanceMapGenerationDlg::getAngularUnit ( ) const

Returns selected angular unit.

Definition at line 460 of file distanceMapGenerationDlg.cpp.

References ANG_DEG, ANG_GRAD, ANG_RAD, and m_angularUnits.

◆ getAngularUnitString()

QString DistanceMapGenerationDlg::getAngularUnitString ( ) const

Returns selected angular unit as a string.

Definition at line 475 of file distanceMapGenerationDlg.cpp.

References m_angularUnits.

Referenced by angularUnitChanged(), exportMapAsGrid(), and exportProfilesAsDXF().

◆ getBaseRadius()

double DistanceMapGenerationDlg::getBaseRadius ( ) const
protected

Returns currently applicable base radius.

Warning: return always 1 for concial projection mode!

Definition at line 1103 of file distanceMapGenerationDlg.cpp.

References getProjectionMode(), and PROJ_CONICAL.

Referenced by baseRadiusChanged(), and exportMapAsCloud().

◆ getCondensedAngularUnitString()

QString DistanceMapGenerationDlg::getCondensedAngularUnitString ( ) const

Returns selected angular unit as a condensed string.

Definition at line 490 of file distanceMapGenerationDlg.cpp.

References m_angularUnits.

Referenced by exportProfilesAsDXF(), and toggleOverlayGrid().

◆ getEmptyCellFillingOption()

DistanceMapGenerationTool::EmptyCellFillOption DistanceMapGenerationDlg::getEmptyCellFillingOption ( ) const

◆ getFillingStrategy()

◆ getGridXValues()

void DistanceMapGenerationDlg::getGridXValues ( double &  minX,
double &  maxX,
double &  step,
ANGULAR_UNIT  unit = ANG_RAD 
) const

Returns the current 'X' parameters.

Always correspond to angular values

Definition at line 996 of file distanceMapGenerationDlg.cpp.

References getSpinboxAngularValue().

Referenced by toggleOverlayGrid(), and updateGridSteps().

◆ getGridYValues()

void DistanceMapGenerationDlg::getGridYValues ( double &  minY,
double &  maxY,
double &  step,
ANGULAR_UNIT  unit = ANG_RAD 
) const

Returns the current 'Y' parameters.

Depends on the current projection mode (i.e. height or latitude). The 'unit' parameter is only required for Conical mode.

Definition at line 1006 of file distanceMapGenerationDlg.cpp.

References getProjectionMode(), getSpinboxAngularValue(), PROJ_CONICAL, and PROJ_CYLINDRICAL.

Referenced by toggleOverlayGrid(), update(), updateGridSteps(), and updateMap().

◆ getHeightUnitString()

QString DistanceMapGenerationDlg::getHeightUnitString ( ) const

Returns height unit.

Definition at line 1118 of file distanceMapGenerationDlg.cpp.

Referenced by exportMapAsGrid(), exportProfilesAsDXF(), toggleOverlayGrid(), and updateHeightUnits().

◆ getProjectionMode()

DistanceMapGenerationDlg::ProjectionMode DistanceMapGenerationDlg::getProjectionMode ( ) const

◆ getScaleYStep()

double DistanceMapGenerationDlg::getScaleYStep ( ANGULAR_UNIT  unit = ANG_RAD) const

Returns scale 'Y' step (current unit)

The 'unit' parameter is only required for Conical mode.

Definition at line 1028 of file distanceMapGenerationDlg.cpp.

References getProjectionMode(), getSpinboxAngularValue(), and PROJ_CYLINDRICAL.

Referenced by exportProfilesAsDXF(), and toggleOverlayGrid().

◆ getSpinboxAngularValue()

double DistanceMapGenerationDlg::getSpinboxAngularValue ( QDoubleSpinBox *  spinBox,
DistanceMapGenerationDlg::ANGULAR_UNIT  unit 
) const
protected

Returns the angle in a particular spinbox in the specified units.

Definition at line 505 of file distanceMapGenerationDlg.cpp.

References ConvertAngleFromRad(), ConvertAngleToRad(), and m_angularUnits.

Referenced by angularUnitChanged(), exportProfilesAsDXF(), getGridXValues(), getGridYValues(), getScaleYStep(), toggleOverlayGrid(), and updateMap().

◆ initFromPersistentSettings()

void DistanceMapGenerationDlg::initFromPersistentSettings ( )
protected

Loads parameters from persistent settings.

Definition at line 1988 of file distanceMapGenerationDlg.cpp.

References angularUnitChanged(), m_colorScaleSelector, ccColorScaleSelector::setSelectedScale(), and updateHeightUnits().

Referenced by DistanceMapGenerationDlg().

◆ labelFontSizeChanged

◆ labelPrecisionChanged

void DistanceMapGenerationDlg::labelPrecisionChanged ( int  prec)
protectedslot

◆ loadOverlaySymbols

◆ overlayGridColorChanged

◆ overlaySymbolsColorChanged

◆ overlaySymbolsSizeChanged

void DistanceMapGenerationDlg::overlaySymbolsSizeChanged ( int  size)
protectedslot

◆ projectionModeChanged

void DistanceMapGenerationDlg::projectionModeChanged ( int  )
protectedslot

◆ saveToPersistentSettings()

void DistanceMapGenerationDlg::saveToPersistentSettings ( )
protected

Saves parameters to persistent settings.

Definition at line 2073 of file distanceMapGenerationDlg.cpp.

References ccColorScaleSelector::getSelectedScale(), and m_colorScaleSelector.

Referenced by update().

◆ spawnColorScaleEditor

◆ toggleColorScaleDisplay

void DistanceMapGenerationDlg::toggleColorScaleDisplay ( bool  state)
protectedslot

◆ toggleOverlayGrid

◆ update

◆ updateGridSteps

void DistanceMapGenerationDlg::updateGridSteps ( )
protectedslot

◆ updateHeightUnits

void DistanceMapGenerationDlg::updateHeightUnits ( )
protectedslot

◆ updateMap()

◆ updateMapTexture()

◆ updateMinAndMaxLimits()

◆ updateOverlayGrid

void DistanceMapGenerationDlg::updateOverlayGrid ( )
protectedslot

Updates overlat grid (if any)

Definition at line 1698 of file distanceMapGenerationDlg.cpp.

References toggleOverlayGrid().

Referenced by angularUnitChanged(), DistanceMapGenerationDlg(), and updateHeightUnits().

◆ updateProfileOrigin

◆ updateProfileRevolDim

void DistanceMapGenerationDlg::updateProfileRevolDim ( int  dim)
protectedslot

◆ updateVolumes

◆ updateZoom()

Member Data Documentation

◆ m_angularUnits

◆ m_app

◆ m_cloud

ccPointCloud* DistanceMapGenerationDlg::m_cloud
protected

◆ m_colorScaleSelector

◆ m_gridColor

QColor DistanceMapGenerationDlg::m_gridColor
protected

Grid color.

Definition at line 198 of file distanceMapGenerationDlg.h.

Referenced by changeGridColor(), overlayGridColorChanged(), and toggleOverlayGrid().

◆ m_map

◆ m_profile

◆ m_sf

ccScalarField* DistanceMapGenerationDlg::m_sf
protected

Associated scalar field.

Definition at line 178 of file distanceMapGenerationDlg.h.

Referenced by DistanceMapGenerationDlg(), and updateMap().

◆ m_symbolColor

QColor DistanceMapGenerationDlg::m_symbolColor
protected

Symbols color.

Definition at line 201 of file distanceMapGenerationDlg.h.

Referenced by changeSymbolColor(), loadOverlaySymbols(), and overlaySymbolsColorChanged().

◆ m_window

◆ m_xLabels

◆ m_yLabels


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