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

Rasterize tool (dialog) More...

#include <ecvRasterizeTool.h>

Inheritance diagram for ccRasterizeTool:
[legend]
Collaboration diagram for ccRasterizeTool:
[legend]

Classes

struct  ExportBands
 Bands to be exported. More...
 

Public Member Functions

 ccRasterizeTool (ccGenericPointCloud *cloud, QWidget *parent=0)
 Default constructor. More...
 
 ~ccRasterizeTool ()
 Destructor. More...
 
- Public Member Functions inherited from cc2Point5DimEditor
 cc2Point5DimEditor ()
 Default constructor. More...
 
virtual ~cc2Point5DimEditor ()
 Destructor. More...
 

Static Public Member Functions

static bool ExportGeoTiff (QString outputFilename, const ExportBands &exportBands, ccRasterGrid::EmptyCellFillOption fillEmptyCellsStrategy, const ccRasterGrid &grid, const ccBBox &gridBBox, unsigned char Z, double customHeightForEmptyCells=std::numeric_limits< double >::quiet_NaN(), ccGenericPointCloud *originCloud=0, int visibleSfIndex=-1)
 Exports a raster grid as a geotiff file. More...
 

Protected Types

enum  LayerType { LAYER_HEIGHT = 0, LAYER_RGB = 1, LAYER_SF = 2 }
 Layer types. More...
 

Protected Slots

ccPointCloud * generateCloud (bool autoExport=true) const
 Exports the grid as a cloud. More...
 
void generateRaster () const
 Exports the grid as a raster. More...
 
void generateMesh () const
 Exports the grid as a mesh. More...
 
void exportContourLines ()
 Exports the (already generated) contour lines. More...
 
void generateContours ()
 Generates a contour plot. More...
 
void generateHillshade ()
 Generates hillshade. More...
 
void removeContourLines ()
 Removes all displayed contour lines. More...
 
void testAndAccept ()
 Accepts the dialog (if some conditions are met) and save settings. More...
 
void testAndReject ()
 Rejects the dialog (if some conditions are met) More...
 
void saveSettings ()
 Save persistent settings and 'accept' dialog. More...
 
void activeLayerChanged (int, bool autoRedraw=true)
 Called when the active layer changes. More...
 
void projectionDirChanged (int)
 Called when the projection direction changes. More...
 
void projectionTypeChanged (int)
 Called when the projection type changes. More...
 
void resampleOptionToggled (bool)
 Called when the 'resampled' option changes. More...
 
void sfProjectionTypeChanged (int)
 Called when the SF projection type changes. More...
 
virtual bool showGridBoxEditor () override
 
void fillEmptyCellStrategyChanged (int)
 Called when the 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...
 
virtual void generateImage () const
 Exports the grid as an image. More...
 
virtual void generateASCIIMatrix () const
 Exports the grid as an ASCII matrix. More...
 

Protected Member Functions

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...
 
double getCustomHeightForEmptyCells () const
 Returns user defined height for empty cells. More...
 
ccRasterGrid::EmptyCellFillOption getFillEmptyCellsStrategyExt (double &emptyCellsHeight, double &minHeight, double &maxHeight) const
 Returns strategy for empty cell filling (extended version) More...
 
bool exportAsSF (ccRasterGrid::ExportableFields field) const
 
bool resampleOriginalCloud () const
 
ccRasterGrid::ProjectionType getTypeOfSFInterpolation () const
 Returns type of SF interpolation. More...
 
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 (bool interpolateSF=false)
 Updates the grid. More...
 
bool canClose ()
 Tests if the dialog can be safely closed. More...
 
void addNewContour (ccPolyline *poly, double height, unsigned subIndex)
 Adds a new contour line. More...
 
ccPointCloud * convertGridToCloud (const std::vector< ccRasterGrid::ExportableFields > &exportedFields, bool interpolateSF, bool interpolateColors, bool copyHillshadeSF, QString activeSFName, bool exportToOriginalCS) const
 Converts the grid to a cloud with scalar field(s) 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_cloud
 Associated cloud. More...
 
std::vector< ccPolyline * > m_contourLines
 Contour lines. More...
 
- Protected Attributes inherited from cc2Point5DimEditor
ccRasterGrid m_grid
 Raster grid. More...
 
ccBoundingBoxEditorDlg * m_bbEditorDlg
 Associated dialog. More...
 
ccPointCloud * m_rasterCloud
 'Raster' cloud More...
 

Detailed Description

Rasterize tool (dialog)

Member Enumeration Documentation

◆ LayerType

Layer types.

Enumerator
LAYER_HEIGHT 
LAYER_RGB 
LAYER_SF 

Constructor & Destructor Documentation

◆ ccRasterizeTool()

◆ ~ccRasterizeTool()

ccRasterizeTool::~ccRasterizeTool ( )

Destructor.

References removeContourLines().

Member Function Documentation

◆ activeLayerChanged

◆ addNewContour()

◆ canClose()

bool ccRasterizeTool::canClose ( )
protected

Tests if the dialog can be safely closed.

References m_contourLines.

Referenced by testAndAccept(), and testAndReject().

◆ convertGridToCloud()

◆ exportAsSF()

bool ccRasterizeTool::exportAsSF ( ccRasterGrid::ExportableFields  field) const
protected

◆ exportContourLines

◆ ExportGeoTiff()

◆ fillEmptyCellStrategyChanged

void ccRasterizeTool::fillEmptyCellStrategyChanged ( int  )
protectedslot

◆ generateASCIIMatrix

◆ generateCloud

◆ generateContours

void ccRasterizeTool::generateContours ( )
protectedslot

Generates a contour plot.

References ccHObject::addChild(), addNewContour(), cloudViewer::PointCloudTpl< T >::addPoint(), cloudViewer::ReferenceCloud::addPointIndex(), Isolines< T >::createOnePixelBorder(), cloudViewer::ScalarField::currentSize(), CVLog::Error(), Isolines< T >::find(), cloudViewer::utility::floor(), cloudViewer::ReferenceCloud::getAssociatedCloud(), Isolines< T >::getContourLength(), Isolines< T >::getContourX(), Isolines< T >::getContourY(), ccPointCloud::getCurrentDisplayedScalarField(), cc2Point5DimEditor::getCustomBBox(), ecvDisplayTools::GetMainWindow(), cloudViewer::ScalarField::getMax(), ccObject::getMetaData(), cloudViewer::ScalarField::getMin(), cloudViewer::GenericIndexedCloud::getPoint(), getProjectionDimension(), cloudViewer::ScalarField::getValue(), ccRasterGrid::gridStep, height, ccRasterGrid::height, Isolines< T >::isContourClosed(), ccRasterGrid::isValid(), cloudViewer::BoundingBoxTpl< T >::isValid(), LAYER_HEIGHT, LAYER_RGB, m_contourLines, cc2Point5DimEditor::m_grid, cc2Point5DimEditor::m_rasterCloud, ccPolyline::MetaKeyConstAltitude(), cloudViewer::BoundingBoxTpl< T >::minCorner(), nProgress, cloudViewer::NormalizedProgress::oneStep(), CVLog::Print(), CVLog::PrintDebug(), ecvDisplayTools::RedrawDisplay(), removeContourLines(), cloudViewer::ReferenceCloud::reserve(), ccPointCloud::reserve(), ccRasterGrid::rows, cloudViewer::Polyline::setClosed(), ccObject::setEnabled(), ecvProgressDialog::setInfo(), ccObject::setMetaData(), ecvProgressDialog::setMethodTitle(), Isolines< T >::setThreshold(), cloudViewer::ReferenceCloud::size(), size, ecvProgressDialog::start(), Tuple3Tpl< Type >::u, cloudViewer::ScalarField::ValidValue(), ccRasterGrid::width, X, Tuple3Tpl< Type >::x, x, Tuple3Tpl< Type >::y, y, and Tuple3Tpl< Type >::z.

Referenced by ccRasterizeTool().

◆ generateHillshade

◆ generateImage

◆ generateMesh

◆ generateRaster

◆ getCustomHeightForEmptyCells()

double ccRasterizeTool::getCustomHeightForEmptyCells ( ) const
protected

Returns user defined height for empty cells.

Referenced by generateRaster(), and getFillEmptyCellsStrategyExt().

◆ getFillEmptyCellsStrategyExt()

◆ getGridStep()

double ccRasterizeTool::getGridStep ( ) const
overrideprotectedvirtual

Returns projection grid step.

Implements cc2Point5DimEditor.

Referenced by updateGrid().

◆ getProjectionDimension()

unsigned char ccRasterizeTool::getProjectionDimension ( ) const
overrideprotectedvirtual

Returns projection dimension.

Returns
dimension as int (0: X, 1: Y, 2:Z)

Implements cc2Point5DimEditor.

Referenced by exportContourLines(), generateContours(), generateMesh(), generateRaster(), and updateGrid().

◆ getTypeOfProjection()

ccRasterGrid::ProjectionType ccRasterizeTool::getTypeOfProjection ( ) const
overrideprotectedvirtual

◆ getTypeOfSFInterpolation()

ccRasterGrid::ProjectionType ccRasterizeTool::getTypeOfSFInterpolation ( ) const
protected

◆ gridIsUpToDate()

void ccRasterizeTool::gridIsUpToDate ( bool  state)
overrideprotectedvirtual

◆ gridOptionChanged

void ccRasterizeTool::gridOptionChanged ( )
protectedslot

Called when the an option of the grid generation has changed.

References gridIsUpToDate().

Referenced by ccRasterizeTool(), and resampleOptionToggled().

◆ loadSettings()

void ccRasterizeTool::loadSettings ( )
protected

Load persistent settings.

References ecvPS::HeightGridGeneration().

Referenced by ccRasterizeTool().

◆ projectionDirChanged

void ccRasterizeTool::projectionDirChanged ( int  dir)
protectedslot

Called when the projection direction changes.

References gridIsUpToDate(), and updateGridInfo().

Referenced by ccRasterizeTool().

◆ projectionTypeChanged

void ccRasterizeTool::projectionTypeChanged ( int  index)
protectedslot

Called when the projection type changes.

References gridIsUpToDate(), and ccRasterGrid::PROJ_AVERAGE_VALUE.

Referenced by ccRasterizeTool().

◆ removeContourLines

void ccRasterizeTool::removeContourLines ( )
protectedslot

◆ resampleOptionToggled

void ccRasterizeTool::resampleOptionToggled ( bool  state)
protectedslot

Called when the 'resampled' option changes.

References getTypeOfProjection(), gridOptionChanged(), and ccRasterGrid::PROJ_AVERAGE_VALUE.

Referenced by ccRasterizeTool().

◆ resampleOriginalCloud()

bool ccRasterizeTool::resampleOriginalCloud ( ) const
protected

Returns whether the output cloud should use the original cloud or the grid as 'support'

Referenced by convertGridToCloud().

◆ saveSettings

void ccRasterizeTool::saveSettings ( )
protectedslot

Save persistent settings and 'accept' dialog.

References ecvPS::HeightGridGeneration().

Referenced by testAndAccept().

◆ sfProjectionTypeChanged

void ccRasterizeTool::sfProjectionTypeChanged ( int  index)
protectedslot

Called when the SF projection type changes.

References gridIsUpToDate().

Referenced by ccRasterizeTool().

◆ showGridBoxEditor

bool ccRasterizeTool::showGridBoxEditor ( )
overrideprotectedvirtualslot

◆ testAndAccept

void ccRasterizeTool::testAndAccept ( )
protectedslot

Accepts the dialog (if some conditions are met) and save settings.

References canClose(), and saveSettings().

Referenced by ccRasterizeTool().

◆ testAndReject

void ccRasterizeTool::testAndReject ( )
protectedslot

Rejects the dialog (if some conditions are met)

References canClose().

Referenced by ccRasterizeTool().

◆ updateGrid()

◆ updateGridAndDisplay

◆ updateGridInfo

void ccRasterizeTool::updateGridInfo ( )
protectedslot

Member Data Documentation

◆ m_cloud

◆ m_contourLines

std::vector<ccPolyline*> ccRasterizeTool::m_contourLines
protected

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