#include <RasterSlicingWizardPage.h>
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::ColorMap * | getColorMap () |
| 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::Envelope & | getExtent () |
| 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::ChartDisplay * | m_chartDisplay |
| The display used to draw the preview histogram. More... | |
| te::qt::widgets::SlicingColorMapWidget * | m_colorMapWidget |
| The widget used to edit the legend of the output layer. More... | |
| std::unique_ptr< te::gm::Geometry > | m_geom |
| The geometry. More... | |
| te::qt::widgets::HistogramChart * | m_histogramChart |
| The preview histogram chart. More... | |
| te::qt::widgets::MapDisplay * | m_mapDisplay |
| The map display. More... | |
| std::unique_ptr< te::rst::Raster > | m_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::Raster > | m_rasterPreview |
| The raster used for preview. More... | |
| std::unique_ptr< te::qt::widgets::RpToolsWidget > | m_tool |
| Toolbar. More... | |
| std::unique_ptr< Ui::RasterSlicingWizardPageForm > | m_ui |
| The wizard page form. More... | |
Private Member Functions | |
| RasterSlicingWizardPage & | operator= (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... | |
Definition at line 63 of file RasterSlicingWizardPage.h.
| te::qt::widgets::RasterSlicingWizardPage::RasterSlicingWizardPage | ( | QWidget * | parent = 0 | ) |
Constructor.
Definition at line 53 of file RasterSlicingWizardPage.cpp.
References te::qt::widgets::ChartDisplay::adjustDisplay(), te::qt::widgets::HistogramChart::attach(), te::qt::widgets::SlicingColorMapWidget::getForm(), m_chartDisplay, m_colorMapWidget, m_extent, m_histogramChart, m_mapDisplay, m_srid, m_tool, m_ui, te::gm::Envelope::makeInvalid(), onEnvelopeAcquired(), te::qt::widgets::ChartStyle::setAxisX(), te::qt::widgets::ChartStyle::setAxisY(), te::qt::widgets::SlicingColorMapWidget::setColorMap(), te::qt::widgets::ChartStyle::setGridChecked(), te::qt::widgets::ChartStyle::setTitle(), updateHistogram(), and ~RasterSlicingWizardPage().
|
default |
Destructor.
Referenced by RasterSlicingWizardPage().
|
private |
| void te::qt::widgets::RasterSlicingWizardPage::applyPreview | ( | ) |
This function applies preview of raster slicing result.
Definition at line 365 of file RasterSlicingWizardPage.cpp.
References te::rst::BandProperty::ColorEntry::c1, te::rst::BandProperty::ColorEntry::c2, te::rst::BandProperty::ColorEntry::c3, te::rst::BandProperty::ColorEntry::c4, drawPreview(), te::common::FreeContents(), te::color::RGBAColor::getAlpha(), te::color::RGBAColor::getBlue(), getColorMap(), te::color::RGBAColor::getGreen(), te::rp::Module::getLastLogStr(), getParameters(), te::color::RGBAColor::getRed(), te::se::GetString(), m_rasterPreview, and te::rp::RasterSlicing().
Referenced by getRasterFromROI().
| void te::qt::widgets::RasterSlicingWizardPage::clearCanvas | ( | ) |
This function cleans the canvas.
Definition at line 284 of file RasterSlicingWizardPage.cpp.
References te::qt::widgets::Canvas::clear(), te::qt::widgets::MapDisplay::getDraftPixmap(), and m_mapDisplay.
| void te::qt::widgets::RasterSlicingWizardPage::drawGeom | ( | ) |
This function draws geometry after the envelope was acquired.
Definition at line 263 of file RasterSlicingWizardPage.cpp.
References te::qt::widgets::Canvas::draw(), te::qt::widgets::MapDisplay::getDraftPixmap(), te::map::MapDisplay::getExtent(), m_geom, te::gm::Envelope::m_llx, te::gm::Envelope::m_lly, m_mapDisplay, te::gm::Envelope::m_urx, te::gm::Envelope::m_ury, te::qt::widgets::Canvas::setDevice(), te::qt::widgets::Canvas::setPolygonContourColor(), te::qt::widgets::Canvas::setPolygonContourWidth(), te::qt::widgets::Canvas::setWindow(), and TE_OPAQUE.
Referenced by onEnvelopeAcquired().
|
protected |
Definition at line 331 of file RasterSlicingWizardPage.cpp.
References te::se::CreateCoverageStyle(), te::qt::widgets::Canvas::draw(), te::map::DrawRaster(), te::qt::widgets::MapDisplay::getDraftPixmap(), te::map::MapDisplay::getExtent(), te::rst::Raster::getExtent(), te::rst::Raster::getNumberOfBands(), te::qt::widgets::MapDisplay::getScale(), te::map::MapDisplay::getSRID(), te::rst::Raster::getSRID(), m_geom, te::gm::Envelope::m_llx, te::gm::Envelope::m_lly, m_mapDisplay, te::gm::Envelope::m_urx, te::gm::Envelope::m_ury, te::qt::widgets::Canvas::setDevice(), te::qt::widgets::Canvas::setPolygonContourColor(), te::qt::widgets::Canvas::setPolygonContourWidth(), te::qt::widgets::Canvas::setWindow(), and TE_OPAQUE.
Referenced by applyPreview().
| te::se::ColorMap * te::qt::widgets::RasterSlicingWizardPage::getColorMap | ( | ) |
This function returns the Color Map generated 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.
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.
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.
| inputRasterBand | The band from the raster selected by the user. |
| slicesNumber | The number of slices that will be used to generate the histogram. |
| eqHistogram | A 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().
|
protected |
Definition at line 293 of file RasterSlicingWizardPage.cpp.
References applyPreview(), te::gm::Envelope::getLowerLeftX(), te::gm::Envelope::getLowerLeftY(), te::map::GetRaster(), te::map::MapDisplay::getSRID(), te::gm::Envelope::getUpperRightX(), te::gm::Envelope::getUpperRightY(), m_geom, te::gm::Envelope::m_llx, te::gm::Envelope::m_lly, m_mapDisplay, m_rasterLayer, m_rasterPreview, te::gm::Envelope::m_urx, te::gm::Envelope::m_ury, te::gm::PolygonType, and TE_UNKNOWN_SRS.
Referenced by onEnvelopeAcquired().
| int te::qt::widgets::RasterSlicingWizardPage::getSRID | ( | ) |
This function 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.
| A | boolean that indicates if the page is complete. |
Definition at line 255 of file RasterSlicingWizardPage.cpp.
References te::qt::widgets::SlicingColorMapWidget::getForm(), and m_colorMapWidget.
|
protectedslot |
Definition at line 230 of file RasterSlicingWizardPage.cpp.
References drawGeom(), te::gm::GetGeomFromEnvelope(), getRasterFromROI(), te::map::MapDisplay::getSRID(), te::gm::Envelope::intersects(), te::gm::Envelope::isValid(), m_geom, m_mapDisplay, m_rasterLayer, and te::gm::Envelope::transform().
Referenced by RasterSlicingWizardPage().
|
protectedslot |
Definition at line 225 of file RasterSlicingWizardPage.cpp.
References m_ui.
|
private |
| void te::qt::widgets::RasterSlicingWizardPage::setActionGroup | ( | QActionGroup * | actionGroup | ) |
This function sets the QActionGroup.
| 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.
| extent | A 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.
| layer | The 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.
| Map | display. |
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.
| srid | The 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;
Definition at line 144 of file RasterSlicingWizardPage.cpp.
References te::gm::Envelope::isValid(), m_extent, m_raster, and m_ui.
|
protectedslot |
Definition at line 201 of file RasterSlicingWizardPage.cpp.
References band, te::qt::widgets::createHistogram(), te::map::GetRaster(), m_chartDisplay, m_histogramChart, m_rasterLayer, m_ui, te::qt::widgets::HistogramChart::setData(), and te::qt::widgets::HistogramChart::setHistogram().
Referenced by RasterSlicingWizardPage().
|
protected |
The display used to draw the preview histogram.
Definition at line 198 of file RasterSlicingWizardPage.h.
Referenced by RasterSlicingWizardPage(), and updateHistogram().
|
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().
|
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().
|
protected |
The geometry.
Definition at line 204 of file RasterSlicingWizardPage.h.
Referenced by drawGeom(), drawPreview(), getRasterFromROI(), and onEnvelopeAcquired().
|
protected |
The preview histogram chart.
Definition at line 200 of file RasterSlicingWizardPage.h.
Referenced by RasterSlicingWizardPage(), and updateHistogram().
|
protected |
The map display.
Definition at line 203 of file RasterSlicingWizardPage.h.
Referenced by clearCanvas(), drawGeom(), drawPreview(), getRasterFromROI(), onEnvelopeAcquired(), RasterSlicingWizardPage(), and setMapDisplay().
|
protected |
The raster that will be sliced.
Definition at line 201 of file RasterSlicingWizardPage.h.
Referenced by setLayer(), and trimRaster().
|
protected |
Testing a better way to show the chart.
Definition at line 202 of file RasterSlicingWizardPage.h.
Referenced by getRasterFromROI(), onEnvelopeAcquired(), setLayer(), and updateHistogram().
|
protected |
The raster used for preview.
Definition at line 205 of file RasterSlicingWizardPage.h.
Referenced by applyPreview(), and getRasterFromROI().
|
private |
The current srid from the display.
Definition at line 220 of file RasterSlicingWizardPage.h.
Referenced by getSRID(), RasterSlicingWizardPage(), and setSRID().
|
protected |
Toolbar.
Definition at line 197 of file RasterSlicingWizardPage.h.
Referenced by RasterSlicingWizardPage(), setActionGroup(), and setMapDisplay().
|
protected |
The wizard page form.
Definition at line 196 of file RasterSlicingWizardPage.h.
Referenced by getCurrentBand(), getParameters(), onSliceBandComboBoxIndexCHanged(), RasterSlicingWizardPage(), setExtent(), setLayer(), trimRaster(), and updateHistogram().