te::qt::widgets::RasterSlicingWizardPage Class Reference

#include <RasterSlicingWizardPage.h>

Inheritance diagram for te::qt::widgets::RasterSlicingWizardPage:
QWizardPage

Public Member Functions

void applyPreview ()
 This function applies preview of raster slicing result. More...
 
void clearCanvas ()
 This function cleans the canvas. More...
 
void drawGeom ()
 This function draws geometry after the envelope was acquired. More...
 
te::se::ColorMapgetColorMap ()
 This function returns the Color Map generated by the user. More...
 
std::string getCurrentBand ()
 This function returns the band from the raster taht will be used. More...
 
const te::gm::EnvelopegetExtent ()
 This function returns the envelope that can be used to trim the raster if the user requests it. More...
 
void getParameters (unsigned int &inputRasterBand, bool &eqHistogram)
 This function returns the parameters as configured by the user. More...
 
int getSRID ()
 This function returns the srid of the display when the wizard was initiated. More...
 
bool isComplete () const
 This function evaluates the page to confirm if the user has completed the minimum configuration required to slice the raster. More...
 
 RasterSlicingWizardPage (QWidget *parent=0)
 Constructor. More...
 
void setActionGroup (QActionGroup *actionGroup)
 This function sets the QActionGroup. More...
 
void setExtent (const te::gm::Envelope &extent)
 This function sets the envelope that will be used to trim tha raster if the user requests it. More...
 
void setLayer (te::map::AbstractLayerPtr layer)
 This function sets the layer that contains the raster that will be sliced. More...
 
void setMapDisplay (te::qt::widgets::MapDisplay *mapDisplay)
 This function sets the map display. More...
 
void setSRID (int srid=0)
 This function sets the srid of the display when the wizard was initiated. More...
 
bool trimRaster ()
 This function will check if the conditions required to trim the raster have been met. More...
 
 ~RasterSlicingWizardPage ()
 Destructor. More...
 

Protected Slots

void onEnvelopeAcquired (te::gm::Envelope env)
 
void onSliceBandComboBoxIndexCHanged (int index)
 
void updateHistogram ()
 

Protected Member Functions

void drawPreview (te::rst::Raster *raster)
 
void getRasterFromROI ()
 

Protected Attributes

te::qt::widgets::ChartDisplaym_chartDisplay
 The display used to draw the preview histogram. More...
 
te::qt::widgets::SlicingColorMapWidgetm_colorMapWidget
 The widget used to edit the legend of the output layer. More...
 
std::unique_ptr< te::gm::Geometrym_geom
 The geometry. More...
 
te::qt::widgets::HistogramChartm_histogramChart
 The preview histogram chart. More...
 
te::qt::widgets::MapDisplaym_mapDisplay
 The map display. More...
 
std::unique_ptr< te::rst::Rasterm_raster
 The raster that will be sliced. More...
 
te::map::AbstractLayerPtr m_rasterLayer
 Testing a better way to show the chart. More...
 
std::unique_ptr< te::rst::Rasterm_rasterPreview
 The raster used for preview. More...
 
std::unique_ptr< te::qt::widgets::RpToolsWidgetm_tool
 Toolbar. More...
 
std::unique_ptr< Ui::RasterSlicingWizardPageForm > m_ui
 The wizard page form. More...
 

Private Member Functions

RasterSlicingWizardPageoperator= (const RasterSlicingWizardPage &rhs)
 
 RasterSlicingWizardPage (const RasterSlicingWizardPage &rhs)
 

Private Attributes

te::gm::Envelope m_extent
 The envelope that can be used to trim the output raster. More...
 
int m_srid
 The current srid from the display. More...
 

Detailed Description

Definition at line 63 of file RasterSlicingWizardPage.h.

Constructor & Destructor Documentation

te::qt::widgets::RasterSlicingWizardPage::~RasterSlicingWizardPage ( )
default

Destructor.

Referenced by RasterSlicingWizardPage().

te::qt::widgets::RasterSlicingWizardPage::RasterSlicingWizardPage ( const RasterSlicingWizardPage rhs)
private

Member Function Documentation

void te::qt::widgets::RasterSlicingWizardPage::clearCanvas ( )
te::se::ColorMap * te::qt::widgets::RasterSlicingWizardPage::getColorMap ( )

This function returns the Color Map generated by the user.

Returns
A color map representing the legend created by the user.

/note The caller will take ownership of the returned pointer

Definition at line 112 of file RasterSlicingWizardPage.cpp.

References te::qt::widgets::SlicingColorMapWidget::getColorMap(), and m_colorMapWidget.

Referenced by applyPreview().

std::string te::qt::widgets::RasterSlicingWizardPage::getCurrentBand ( )

This function returns the band from the raster taht will be used.

Returns
A string that represents the band that will be used to slice the raster.

Definition at line 117 of file RasterSlicingWizardPage.cpp.

References m_ui.

const te::gm::Envelope & te::qt::widgets::RasterSlicingWizardPage::getExtent ( )

This function returns the envelope that can be used to trim the raster if the user requests it.

Returns
A reference to the Envelope that can be used to trim the raster if the user requests it.

Definition at line 122 of file RasterSlicingWizardPage.cpp.

References m_extent.

void te::qt::widgets::RasterSlicingWizardPage::getParameters ( unsigned int inputRasterBand,
bool eqHistogram 
)

This function returns the parameters as configured by the user.

Parameters
inputRasterBandThe band from the raster selected by the user.
slicesNumberThe number of slices that will be used to generate the histogram.
eqHistogramA boolean that holds weather the histogram will be equalized or not.

Definition at line 248 of file RasterSlicingWizardPage.cpp.

References m_ui.

Referenced by applyPreview().

int te::qt::widgets::RasterSlicingWizardPage::getSRID ( )

This function returns the srid of the display when the wizard was initiated.

Returns
The srid of the display when the wizard was initiated.

Definition at line 127 of file RasterSlicingWizardPage.cpp.

References m_srid.

bool te::qt::widgets::RasterSlicingWizardPage::isComplete ( ) const

This function evaluates the page to confirm if the user has completed the minimum configuration required to slice the raster.

In order for this function to return true:

The color map taht will be used on the output layer can not be empty.

Parameters
Aboolean that indicates if the page is complete.

Definition at line 255 of file RasterSlicingWizardPage.cpp.

References te::qt::widgets::SlicingColorMapWidget::getForm(), and m_colorMapWidget.

void te::qt::widgets::RasterSlicingWizardPage::onSliceBandComboBoxIndexCHanged ( int  index)
protectedslot

Definition at line 225 of file RasterSlicingWizardPage.cpp.

References m_ui.

RasterSlicingWizardPage& te::qt::widgets::RasterSlicingWizardPage::operator= ( const RasterSlicingWizardPage rhs)
private
void te::qt::widgets::RasterSlicingWizardPage::setActionGroup ( QActionGroup *  actionGroup)

This function sets the QActionGroup.

Parameters
QActionGroup.

Definition at line 138 of file RasterSlicingWizardPage.cpp.

References m_tool.

void te::qt::widgets::RasterSlicingWizardPage::setExtent ( const te::gm::Envelope extent)

This function sets the envelope that will be used to trim tha raster if the user requests it.

Parameters
extentA reference to the envelope that can be used to trim tha raster.

Definition at line 186 of file RasterSlicingWizardPage.cpp.

References te::gm::Envelope::isValid(), m_extent, and m_ui.

void te::qt::widgets::RasterSlicingWizardPage::setLayer ( te::map::AbstractLayerPtr  layer)

This function sets the layer that contains the raster that will be sliced.

Parameters
layerThe layer from which the raster will be obtained.

Definition at line 156 of file RasterSlicingWizardPage.cpp.

References band, ds, te::da::GetFirstPropertyPos(), m_colorMapWidget, m_raster, m_rasterLayer, m_ui, te::dt::RASTER_TYPE, and te::qt::widgets::SlicingColorMapWidget::setRaster().

void te::qt::widgets::RasterSlicingWizardPage::setMapDisplay ( te::qt::widgets::MapDisplay mapDisplay)

This function sets the map display.

Parameters
Mapdisplay.

Definition at line 132 of file RasterSlicingWizardPage.cpp.

References m_mapDisplay, and m_tool.

void te::qt::widgets::RasterSlicingWizardPage::setSRID ( int  srid = 0)

This function sets the srid of the display when the wizard was initiated.

Parameters
sridThe current srid of the display.

Definition at line 196 of file RasterSlicingWizardPage.cpp.

References m_srid.

bool te::qt::widgets::RasterSlicingWizardPage::trimRaster ( )

This function will check if the conditions required to trim the raster have been met.

In order for this function to return true:

The user must select the option to use the visible area; The extent must be valid; The extent must be within the raster;

Returns
A boolean that indicates if the raster can be trimmed.

Definition at line 144 of file RasterSlicingWizardPage.cpp.

References te::gm::Envelope::isValid(), m_extent, m_raster, and m_ui.

Member Data Documentation

te::qt::widgets::ChartDisplay* te::qt::widgets::RasterSlicingWizardPage::m_chartDisplay
protected

The display used to draw the preview histogram.

Definition at line 198 of file RasterSlicingWizardPage.h.

Referenced by RasterSlicingWizardPage(), and updateHistogram().

te::qt::widgets::SlicingColorMapWidget* te::qt::widgets::RasterSlicingWizardPage::m_colorMapWidget
protected

The widget used to edit the legend of the output layer.

Definition at line 199 of file RasterSlicingWizardPage.h.

Referenced by getColorMap(), isComplete(), RasterSlicingWizardPage(), and setLayer().

te::gm::Envelope te::qt::widgets::RasterSlicingWizardPage::m_extent
private

The envelope that can be used to trim the output raster.

Definition at line 219 of file RasterSlicingWizardPage.h.

Referenced by getExtent(), RasterSlicingWizardPage(), setExtent(), and trimRaster().

std::unique_ptr<te::gm::Geometry> te::qt::widgets::RasterSlicingWizardPage::m_geom
protected

The geometry.

Definition at line 204 of file RasterSlicingWizardPage.h.

Referenced by drawGeom(), drawPreview(), getRasterFromROI(), and onEnvelopeAcquired().

te::qt::widgets::HistogramChart* te::qt::widgets::RasterSlicingWizardPage::m_histogramChart
protected

The preview histogram chart.

Definition at line 200 of file RasterSlicingWizardPage.h.

Referenced by RasterSlicingWizardPage(), and updateHistogram().

te::qt::widgets::MapDisplay* te::qt::widgets::RasterSlicingWizardPage::m_mapDisplay
protected
std::unique_ptr<te::rst::Raster> te::qt::widgets::RasterSlicingWizardPage::m_raster
protected

The raster that will be sliced.

Definition at line 201 of file RasterSlicingWizardPage.h.

Referenced by setLayer(), and trimRaster().

te::map::AbstractLayerPtr te::qt::widgets::RasterSlicingWizardPage::m_rasterLayer
protected

Testing a better way to show the chart.

Definition at line 202 of file RasterSlicingWizardPage.h.

Referenced by getRasterFromROI(), onEnvelopeAcquired(), setLayer(), and updateHistogram().

std::unique_ptr<te::rst::Raster> te::qt::widgets::RasterSlicingWizardPage::m_rasterPreview
protected

The raster used for preview.

Definition at line 205 of file RasterSlicingWizardPage.h.

Referenced by applyPreview(), and getRasterFromROI().

int te::qt::widgets::RasterSlicingWizardPage::m_srid
private

The current srid from the display.

Definition at line 220 of file RasterSlicingWizardPage.h.

Referenced by getSRID(), RasterSlicingWizardPage(), and setSRID().

std::unique_ptr<te::qt::widgets::RpToolsWidget> te::qt::widgets::RasterSlicingWizardPage::m_tool
protected

Toolbar.

Definition at line 197 of file RasterSlicingWizardPage.h.

Referenced by RasterSlicingWizardPage(), setActionGroup(), and setMapDisplay().

std::unique_ptr<Ui::RasterSlicingWizardPageForm> te::qt::widgets::RasterSlicingWizardPage::m_ui
protected

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