![]() |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
Volume calculation tool (dialog) More...
#include <ecvVolumeCalcTool.h>


Classes | |
| struct | ReportInfo |
| Report info. More... | |
Public Member Functions | |
| ccVolumeCalcTool (ccGenericPointCloud *cloud1, ccGenericPointCloud *cloud2, QWidget *parent=0) | |
| Default constructor. More... | |
| ~ccVolumeCalcTool () | |
| Destructor. More... | |
| virtual double | getGridStep () const override |
| Returns projection grid step. More... | |
| virtual unsigned char | getProjectionDimension () const override |
| Returns projection dimension. More... | |
| virtual ccRasterGrid::ProjectionType | getTypeOfProjection () const override |
| Returns type of projection. More... | |
Public Member Functions inherited from cc2Point5DimEditor | |
| cc2Point5DimEditor () | |
| Default constructor. More... | |
| virtual | ~cc2Point5DimEditor () |
| Destructor. More... | |
Static Public Member Functions | |
| static bool | ComputeVolume (ccRasterGrid &grid, ccGenericPointCloud *ground, ccGenericPointCloud *ceil, const ccBBox &gridBox, unsigned char vertDim, double gridStep, unsigned gridWidth, unsigned gridHeight, ccRasterGrid::ProjectionType projectionType, ccRasterGrid::EmptyCellFillOption groundEmptyCellFillStrategy, ccRasterGrid::EmptyCellFillOption ceilEmptyCellFillStrategy, ccVolumeCalcTool::ReportInfo &reportInfo, double groundHeight, double ceilHeight, QWidget *parentWidget=0) |
| Static accessor. More... | |
| static ccPointCloud * | ConvertGridToCloud (ccRasterGrid &grid, const ccBBox &gridBox, unsigned char vertDim, bool exportToOriginalCS) |
| Converts a (volume) grid to a point cloud. More... | |
Protected Slots | |
| void | saveSettingsAndAccept () |
| Accepts the dialog and save settings. More... | |
| void | saveSettings () |
| Save persistent settings and 'accept' dialog. More... | |
| void | projectionDirChanged (int) |
| Called when the projection direction changes. More... | |
| void | sfProjectionTypeChanged (int) |
| Called when the SF projection type changes. More... | |
| virtual bool | showGridBoxEditor () override |
| void | groundFillEmptyCellStrategyChanged (int) |
| Called when the (ground) empty cell filling strategy changes. More... | |
| void | ceilFillEmptyCellStrategyChanged (int) |
| Called when the (ceil) empty cell filling strategy changes. More... | |
| void | gridOptionChanged () |
| Called when the an option of the grid generation has changed. More... | |
| void | updateGridInfo () |
| Updates the gid info. More... | |
| void | updateGridAndDisplay () |
| Update the grid and the 2D display. More... | |
| void | swapRoles () |
| Swap roles. More... | |
| void | groundSourceChanged (int) |
| Ground source changed. More... | |
| void | ceilSourceChanged (int) |
| Ceil source changed. More... | |
| void | exportToClipboard () const |
| Exports info to clipboard. More... | |
| void | exportGridAsCloud () const |
| Exports the grid as a point cloud. More... | |
| void | setDisplayedNumberPrecision (int) |
| Sets the displayed number precision. More... | |
Protected Member Functions | |
| virtual void | gridIsUpToDate (bool state) override |
| Declares whether the grid is up-to-date or not. More... | |
| void | loadSettings () |
| Load persistent settings. More... | |
| bool | updateGrid () |
| Updates the grid. More... | |
| ccPointCloud * | convertGridToCloud (bool exportToOriginalCS) const |
| Converts the grid to a point cloud. More... | |
| void | outputReport (const ReportInfo &info) |
| Outputs the report. More... | |
Protected Member Functions inherited from cc2Point5DimEditor | |
| virtual ccBBox | getCustomBBox () const |
| Returns custom bbox. More... | |
| virtual void | update2DDisplayZoom (ccBBox &box) |
| Updates the 2D display zoom. More... | |
| virtual bool | showGridBoxEditor () |
| Show grid box editor and update. More... | |
| virtual QString | getGridSizeAsString () const |
| Returns the grid size as a string. More... | |
| virtual bool | getGridSize (unsigned &width, unsigned &height) const |
| Returns the grid size. More... | |
| void | createBoundingBoxEditor (const ccBBox &gridBBox, QWidget *parent) |
| Creates the bounding-box editor. More... | |
| void | create2DView (QFrame *parentFrame) |
| Creates the 2D view. More... | |
| ccRasterGrid::EmptyCellFillOption | getFillEmptyCellsStrategy (QComboBox *comboBox) const |
| Returns the empty cell strategy (for a given combo-box) More... | |
| ccPointCloud * | convertGridToCloud (const std::vector< ccRasterGrid::ExportableFields > &exportedFields, bool interpolateSF, bool interpolateColors, bool resampleInputCloudXY, bool resampleInputCloudZ, ccGenericPointCloud *inputCloud, bool fillEmptyCells, double emptyCellsHeight, bool exportToOriginalCS) const |
| Shortcut to ccRasterGrid::convertToCloud. More... | |
Protected Attributes | |
| ccGenericPointCloud * | m_cloud1 |
| First associated cloud. More... | |
| ccGenericPointCloud * | m_cloud2 |
| Second associated cloud. More... | |
| ReportInfo | m_lastReport |
| Last report. More... | |
Protected Attributes inherited from cc2Point5DimEditor | |
| ccRasterGrid | m_grid |
| Raster grid. More... | |
| ccBoundingBoxEditorDlg * | m_bbEditorDlg |
| Associated dialog. More... | |
| ccPointCloud * | m_rasterCloud |
| 'Raster' cloud More... | |
Volume calculation tool (dialog)
Definition at line 24 of file ecvVolumeCalcTool.h.
| ccVolumeCalcTool::ccVolumeCalcTool | ( | ccGenericPointCloud * | cloud1, |
| ccGenericPointCloud * | cloud2, | ||
| QWidget * | parent = 0 |
||
| ) |
Default constructor.
Definition at line 42 of file ecvVolumeCalcTool.cpp.
References ceilFillEmptyCellStrategyChanged(), ceilSourceChanged(), cc2Point5DimEditor::create2DView(), cc2Point5DimEditor::createBoundingBoxEditor(), exportGridAsCloud(), exportToClipboard(), ecvDisplayTools::GetDisplayParameters(), ecvDisplayTools::GetMainWindow(), ccObject::getName(), ccGenericPointCloud::getOwnBB(), gridIsUpToDate(), gridOptionChanged(), groundFillEmptyCellStrategyChanged(), groundSourceChanged(), cloudViewer::BoundingBoxTpl< T >::isValid(), loadSettings(), m_cloud1, m_cloud2, params, projectionDirChanged(), saveSettingsAndAccept(), setDisplayedNumberPrecision(), ecvDisplayTools::SetDisplayParameters(), showGridBoxEditor(), std::swap(), swapRoles(), updateGridAndDisplay(), and updateGridInfo().
| ccVolumeCalcTool::~ccVolumeCalcTool | ( | ) |
Destructor.
Definition at line 157 of file ecvVolumeCalcTool.cpp.
|
protectedslot |
Called when the (ceil) empty cell filling strategy changes.
Definition at line 246 of file ecvVolumeCalcTool.cpp.
References ccRasterGrid::FILL_CUSTOM_HEIGHT, cc2Point5DimEditor::getFillEmptyCellsStrategy(), and gridIsUpToDate().
Referenced by ccVolumeCalcTool(), and ceilSourceChanged().
|
protectedslot |
Ceil source changed.
Definition at line 180 of file ecvVolumeCalcTool.cpp.
References ceilFillEmptyCellStrategyChanged().
Referenced by ccVolumeCalcTool().
|
static |
Static accessor.
Definition at line 499 of file ecvVolumeCalcTool.cpp.
References ccVolumeCalcTool::ReportInfo::addedVolume, ccVolumeCalcTool::ReportInfo::averageNeighborsPerCell, ccRasterCell::avgHeight, cloudViewer::utility::ceil(), ccVolumeCalcTool::ReportInfo::ceilNonMatchingPercent, count, ccRasterGrid::fillEmptyCells(), ccRasterGrid::fillWith(), Vector3Tpl< double >::fromArray(), ccRasterGrid::gridStep, ccVolumeCalcTool::ReportInfo::groundNonMatchingPercent, ccRasterCell::h, ccRasterGrid::height, ccRasterGrid::init(), ccRasterGrid::INTERPOLATE_DELAUNAY, ccRasterGrid::INVALID_PROJECTION_TYPE, cloudViewer::BoundingBoxTpl< T >::isValid(), ccVolumeCalcTool::ReportInfo::matchingPrecent, ccRasterCell::maxHeight, ccRasterGrid::maxHeight, cloudViewer::BoundingBoxTpl< T >::minCorner(), ccRasterCell::minHeight, ccRasterGrid::minHeight, ccRasterCell::nbPoints, ccRasterGrid::nonEmptyCellCount, nProgress, cloudViewer::NormalizedProgress::oneStep(), CVLog::Print(), ccVolumeCalcTool::ReportInfo::removedVolume, ccRasterGrid::rows, SendError(), ccRasterGrid::setValid(), ccRasterCell::stdDevHeight, ccVolumeCalcTool::ReportInfo::surface, Tuple3Tpl< Type >::u, ccRasterGrid::validCellCount, ccVolumeCalcTool::ReportInfo::volume, CVLog::Warning(), and ccRasterGrid::width.
Referenced by CommandVolume25D::process(), and updateGrid().
|
protected |
Converts the grid to a point cloud.
Definition at line 395 of file ecvVolumeCalcTool.cpp.
References cc2Point5DimEditor::convertGridToCloud(), CVLog::Error(), cloudViewer::ScalarField::getMax(), cloudViewer::ScalarField::getMin(), cloudViewer::PointCloudTpl< T >::getScalarField(), ccPointCloud::hasScalarFields(), ccRasterGrid::PER_CELL_VALUE, ccPointCloud::setCurrentDisplayedScalarField(), cloudViewer::ScalarField::setName(), ccScalarField::setSymmetricalScale(), ccDrawableObject::showSF(), and ccPointCloud::showSFColorsScale().
Referenced by exportGridAsCloud(), and updateGridAndDisplay().
|
static |
Converts a (volume) grid to a point cloud.
Definition at line 356 of file ecvVolumeCalcTool.cpp.
References ccRasterGrid::convertToCloud(), cloudViewer::ScalarField::getMax(), cloudViewer::ScalarField::getMin(), cloudViewer::PointCloudTpl< T >::getScalarField(), ccPointCloud::hasScalarFields(), cloudViewer::BoundingBoxTpl< T >::isValid(), ccRasterGrid::PER_CELL_VALUE, ccPointCloud::setCurrentDisplayedScalarField(), cloudViewer::ScalarField::setName(), ccScalarField::setSymmetricalScale(), ccDrawableObject::showSF(), ccPointCloud::showSFColorsScale(), and CVLog::Warning().
Referenced by CommandVolume25D::process().
|
protectedslot |
Exports the grid as a point cloud.
Definition at line 817 of file ecvVolumeCalcTool.cpp.
References ccHObject::addChild(), MainWindow::addToDB(), convertGridToCloud(), ccObject::getName(), ccHObject::getParent(), ccRasterGrid::isValid(), m_cloud1, m_cloud2, cc2Point5DimEditor::m_grid, CVLog::Print(), ccObject::setName(), and MainWindow::TheInstance().
Referenced by ccVolumeCalcTool().
|
protectedslot |
Exports info to clipboard.
Definition at line 810 of file ecvVolumeCalcTool.cpp.
Referenced by ccVolumeCalcTool().
|
overridevirtual |
Returns projection grid step.
Implements cc2Point5DimEditor.
Definition at line 216 of file ecvVolumeCalcTool.cpp.
Referenced by updateGrid().
|
overridevirtual |
Returns projection dimension.
Implements cc2Point5DimEditor.
Definition at line 220 of file ecvVolumeCalcTool.cpp.
Referenced by updateGrid().
|
overridevirtual |
Returns type of projection.
Implements cc2Point5DimEditor.
Definition at line 258 of file ecvVolumeCalcTool.cpp.
References ccRasterGrid::INVALID_PROJECTION_TYPE, ccRasterGrid::PROJ_AVERAGE_VALUE, ccRasterGrid::PROJ_MAXIMUM_VALUE, and ccRasterGrid::PROJ_MINIMUM_VALUE.
Referenced by updateGrid().
|
overrideprotectedvirtual |
Declares whether the grid is up-to-date or not.
Implements cc2Point5DimEditor.
Definition at line 339 of file ecvVolumeCalcTool.cpp.
Referenced by ccVolumeCalcTool(), ceilFillEmptyCellStrategyChanged(), gridOptionChanged(), groundFillEmptyCellStrategyChanged(), projectionDirChanged(), sfProjectionTypeChanged(), swapRoles(), and updateGridAndDisplay().
|
protectedslot |
Called when the an option of the grid generation has changed.
Definition at line 256 of file ecvVolumeCalcTool.cpp.
References gridIsUpToDate().
Referenced by ccVolumeCalcTool().
|
protectedslot |
Called when the (ground) empty cell filling strategy changes.
Definition at line 236 of file ecvVolumeCalcTool.cpp.
References ccRasterGrid::FILL_CUSTOM_HEIGHT, cc2Point5DimEditor::getFillEmptyCellsStrategy(), and gridIsUpToDate().
Referenced by ccVolumeCalcTool(), and groundSourceChanged().
|
protectedslot |
Ground source changed.
Definition at line 174 of file ecvVolumeCalcTool.cpp.
References groundFillEmptyCellStrategyChanged().
Referenced by ccVolumeCalcTool().
|
protected |
Load persistent settings.
Definition at line 274 of file ecvVolumeCalcTool.cpp.
References ecvPS::VolumeCalculation().
Referenced by ccVolumeCalcTool().
|
protected |
Outputs the report.
Definition at line 478 of file ecvVolumeCalcTool.cpp.
References ccVolumeCalcTool::ReportInfo::averageNeighborsPerCell, m_lastReport, and ccVolumeCalcTool::ReportInfo::toText().
Referenced by setDisplayedNumberPrecision(), and updateGrid().
|
protectedslot |
Called when the projection direction changes.
Definition at line 231 of file ecvVolumeCalcTool.cpp.
References gridIsUpToDate(), and updateGridInfo().
Referenced by ccVolumeCalcTool().
|
protectedslot |
Save persistent settings and 'accept' dialog.
Definition at line 320 of file ecvVolumeCalcTool.cpp.
References ecvPS::VolumeCalculation().
Referenced by saveSettingsAndAccept().
|
protectedslot |
Accepts the dialog and save settings.
Definition at line 315 of file ecvVolumeCalcTool.cpp.
References saveSettings().
Referenced by ccVolumeCalcTool().
|
protectedslot |
Sets the displayed number precision.
Definition at line 159 of file ecvVolumeCalcTool.cpp.
References ecvDisplayTools::GetDisplayParameters(), ecvDisplayTools::GetMainWindow(), m_lastReport, outputReport(), params, ecvDisplayTools::RedrawDisplay(), and ecvDisplayTools::SetDisplayParameters().
Referenced by ccVolumeCalcTool().
|
protectedslot |
Called when the SF projection type changes.
Definition at line 227 of file ecvVolumeCalcTool.cpp.
References gridIsUpToDate().
|
overrideprotectedvirtualslot |
Definition at line 203 of file ecvVolumeCalcTool.cpp.
References cc2Point5DimEditor::showGridBoxEditor(), and updateGridInfo().
Referenced by ccVolumeCalcTool().
|
protectedslot |
Swap roles.
Definition at line 185 of file ecvVolumeCalcTool.cpp.
References gridIsUpToDate().
Referenced by ccVolumeCalcTool().
|
protected |
Updates the grid.
Definition at line 738 of file ecvVolumeCalcTool.cpp.
References ComputeVolume(), cc2Point5DimEditor::getCustomBBox(), cc2Point5DimEditor::getFillEmptyCellsStrategy(), cc2Point5DimEditor::getGridSize(), getGridStep(), getProjectionDimension(), getTypeOfProjection(), cloudViewer::BoundingBoxTpl< T >::isValid(), m_cloud1, m_cloud2, cc2Point5DimEditor::m_grid, and outputReport().
Referenced by updateGridAndDisplay().
|
protectedslot |
Update the grid and the 2D display.
Definition at line 427 of file ecvVolumeCalcTool.cpp.
References ecvDisplayTools::AddToOwnDB(), convertGridToCloud(), CVLog::Error(), ccHObject::getDisplayBB_recursive(), ecvDisplayTools::GetMainWindow(), gridIsUpToDate(), cc2Point5DimEditor::m_rasterCloud, ecvDisplayTools::RedrawDisplay(), ecvDisplayTools::RemoveFromOwnDB(), cc2Point5DimEditor::update2DDisplayZoom(), and updateGrid().
Referenced by ccVolumeCalcTool().
|
protectedslot |
Updates the gid info.
Definition at line 212 of file ecvVolumeCalcTool.cpp.
References cc2Point5DimEditor::getGridSizeAsString().
Referenced by ccVolumeCalcTool(), projectionDirChanged(), and showGridBoxEditor().
|
protected |
First associated cloud.
Definition at line 157 of file ecvVolumeCalcTool.h.
Referenced by ccVolumeCalcTool(), exportGridAsCloud(), and updateGrid().
|
protected |
Second associated cloud.
Definition at line 159 of file ecvVolumeCalcTool.h.
Referenced by ccVolumeCalcTool(), exportGridAsCloud(), and updateGrid().
|
protected |
Last report.
Only valid if clipboardPushButton is enabled
Definition at line 164 of file ecvVolumeCalcTool.h.
Referenced by outputReport(), and setDisplayedNumberPrecision().