A ROISet is a set of ROI's. More...
#include <ROISet.h>
Public Member Functions | |
| void | addROI (te::cl::ROI *roi) |
| Add a new ROI to this set. More... | |
| void | exportToFile (std::string fileName, int srid) |
| Export the ROISet to a shapefile. More... | |
| te::cl::ROI * | getROI (std::string label) |
| Gets a ROI from this set. More... | |
| std::map< std::string, te::cl::ROI * > & | getROISet () |
| Get the roi set map. More... | |
| void | removeROI (std::string label) |
| Removes a ROI from this set. More... | |
| ROISet () | |
| Default constructor. More... | |
| virtual | ~ROISet () |
| Virtual destructor. More... | |
Static Public Member Functions | |
| static te::cl::ROISet * | createROISet (std::unique_ptr< te::da::DataSet > ds) |
| Imports the ROISet from a dataset. More... | |
Protected Member Functions | |
| std::unique_ptr< te::da::DataSet > | getDataSet (int srid) |
| Creates a dataset that with the roi set information. More... | |
| std::unique_ptr< te::da::DataSetType > | getDataSetType (int srid) |
| Creates a dataset type that defines a roi. More... | |
Private Attributes | |
| std::map< std::string, te::cl::ROI * > | m_roiMap |
| The map of ROI's. More... | |
|
default |
Default constructor.
|
virtual |
Virtual destructor.
Definition at line 48 of file ROISet.cpp.
References te::common::FreeContents(), and m_roiMap.
| void te::cl::ROISet::addROI | ( | te::cl::ROI * | roi | ) |
Add a new ROI to this set.
| roi | A pointer to a ROI object. |
Definition at line 64 of file ROISet.cpp.
References te::cl::ROI::getLabel(), and m_roiMap.
Referenced by createROISet(), and te::qt::widgets::ROIManagerWidget::onAddROIToolButtonClicked().
|
static |
Imports the ROISet from a dataset.
| ds | The dataset with the ROISet information |
Definition at line 113 of file ROISet.cpp.
References te::cl::ROI::addPolygon(), addROI(), te::gm::GeometryCollection::getGeometries(), getROI(), p, te::cl::ROI::setColor(), TE_CL_ROI_COLOR_NAME, TE_CL_ROI_GEOM_ID_NAME, and TE_CL_ROI_LABEL_NAME.
Referenced by te::qt::widgets::ROIManagerWidget::onLayerComboBoxChanged(), and te::qt::widgets::ROIManagerWidget::onOpenLayerROIToolButtonClicked().
| void te::cl::ROISet::exportToFile | ( | std::string | fileName, |
| int | srid | ||
| ) |
Export the ROISet to a shapefile.
| fileName | The file name path. |
| srid | The spatial reference system used to export the ROI's. |
Definition at line 82 of file ROISet.cpp.
References getDataSet(), getDataSetType(), and te::da::DataSourceFactory::make().
Referenced by te::qt::widgets::ROIManagerWidget::onExportROISetToolButtonClicked().
|
protected |
Creates a dataset that with the roi set information.
Definition at line 186 of file ROISet.cpp.
References te::gm::Polygon::clone(), DataSet(), ds, te::cl::ROI::getColor(), getDataSetType(), te::cl::ROI::getLabel(), te::cl::ROI::getPolygons(), m_roiMap, te::mem::DataSetItem::setGeometry(), te::mem::DataSetItem::setString(), TE_CL_ROI_COLOR_NAME, TE_CL_ROI_GEOM_ID_NAME, TE_CL_ROI_GEOM_NAME, and TE_CL_ROI_LABEL_NAME.
Referenced by exportToFile().
|
protected |
Creates a dataset type that defines a roi.
Definition at line 162 of file ROISet.cpp.
References te::da::PrimaryKey::add(), te::da::DataSetType::add(), te::gm::PolygonType, TE_CL_ROI_COLOR_NAME, TE_CL_ROI_GEOM_ID_NAME, TE_CL_ROI_GEOM_NAME, TE_CL_ROI_LABEL_NAME, and TE_CL_ROI_PK_NAME.
Referenced by exportToFile(), and getDataSet().
| te::cl::ROI * te::cl::ROISet::getROI | ( | std::string | label | ) |
Gets a ROI from this set.
| label | The label of the ROI to be selected. |
Definition at line 54 of file ROISet.cpp.
References m_roiMap.
Referenced by createROISet(), te::qt::widgets::ROIManagerWidget::drawROISet(), te::qt::widgets::ROIManagerWidget::onEnvelopeAcquired(), te::qt::widgets::ROIManagerWidget::onGeomAquired(), te::qt::widgets::ROIManagerWidget::onRemoveROIToolButtonClicked(), and te::qt::widgets::ROIManagerWidget::onROITreItemClicked().
| std::map< std::string, te::cl::ROI * > & te::cl::ROISet::getROISet | ( | ) |
Get the roi set map.
Definition at line 77 of file ROISet.cpp.
References m_roiMap.
Referenced by te::qt::widgets::ROIManagerWidget::checkGeomIntersection(), te::qt::widgets::ROIManagerWidget::drawROISet(), te::qt::widgets::ClassifierWizard::execute(), te::qt::widgets::ClassifierWizardPage::getEDSamples(), te::qt::widgets::ClassifierWizardPage::getMAPSamples(), te::qt::widgets::ClassifierWizardPage::getSAMSamples(), te::qt::widgets::ROIManagerWidget::onAddROIToolButtonClicked(), te::qt::widgets::ClassifierWizardPage::onChangeClassifier(), te::qt::widgets::ROIManagerWidget::onExportROISetToolButtonClicked(), te::qt::widgets::ROIManagerWidget::onLayerComboBoxChanged(), te::qt::widgets::ROIManagerWidget::onOpenLayerROIToolButtonClicked(), and te::qt::widgets::ROIManagerWidget::onRemoveROIToolButtonClicked().
| void te::cl::ROISet::removeROI | ( | std::string | label | ) |
Removes a ROI from this set.
| label | The label of the ROI to be removed. |
Definition at line 69 of file ROISet.cpp.
References m_roiMap.
Referenced by te::qt::widgets::ROIManagerWidget::onRemoveROIToolButtonClicked().
|
private |
The map of ROI's.
Definition at line 118 of file ROISet.h.
Referenced by addROI(), getDataSet(), getROI(), getROISet(), removeROI(), and ~ROISet().