All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
te::cl::ROISet Class Reference

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::ROIgetROI (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::ROISetcreateROISet (std::auto_ptr< te::da::DataSet > ds)
 Imports the ROISet from a dataset. More...
 

Protected Member Functions

std::auto_ptr< te::da::DataSetgetDataSet (int srid)
 Creates a dataset that with the roi set information. More...
 
std::auto_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...
 

Detailed Description

A ROISet is a set of ROI's.

See also
ROI

Definition at line 53 of file ROISet.h.

Constructor & Destructor Documentation

te::cl::ROISet::ROISet ( )

Default constructor.

Definition at line 46 of file ROISet.cpp.

te::cl::ROISet::~ROISet ( )
virtual

Virtual destructor.

Definition at line 50 of file ROISet.cpp.

References te::common::FreeContents().

Member Function Documentation

void te::cl::ROISet::addROI ( te::cl::ROI roi)

Add a new ROI to this set.

Parameters
roiA pointer to a ROI object.

Definition at line 66 of file ROISet.cpp.

References te::cl::ROI::getLabel().

Referenced by createROISet().

te::cl::ROISet * te::cl::ROISet::createROISet ( std::auto_ptr< te::da::DataSet ds)
static

Imports the ROISet from a dataset.

Parameters
dsThe dataset with the ROISet information
Returns
If the dataset has a valid ROISet information, a valid ROISet pointer will be returned, in other case, a NULL pointer will be returned.

Definition at line 126 of file ROISet.cpp.

References te::cl::ROI::addPolygon(), addROI(), te::gm::GeometryCollection::getGeometries(), getROI(), 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::onOpenLayerROIToolButtonClicked().

void te::cl::ROISet::exportToFile ( std::string  fileName,
int  srid 
)

Export the ROISet to a shapefile.

Parameters
fileNameThe file name path.
sridThe spatial reference system used to export the ROI's.

Definition at line 84 of file ROISet.cpp.

References te::da::CreateAdapter(), te::da::DataSetTypeConverter::getResult(), and te::da::DataSourceFactory::make().

std::auto_ptr< te::da::DataSet > te::cl::ROISet::getDataSet ( int  srid)
protected
std::auto_ptr< te::da::DataSetType > te::cl::ROISet::getDataSetType ( int  srid)
protected
te::cl::ROI * te::cl::ROISet::getROI ( std::string  label)

Gets a ROI from this set.

Parameters
labelThe label of the ROI to be selected.

Definition at line 56 of file ROISet.cpp.

Referenced by createROISet().

void te::cl::ROISet::removeROI ( std::string  label)

Removes a ROI from this set.

Parameters
labelThe label of the ROI to be removed.

Definition at line 71 of file ROISet.cpp.

Member Data Documentation

std::map<std::string, te::cl::ROI*> te::cl::ROISet::m_roiMap
private

The map of ROI's.

Definition at line 118 of file ROISet.h.


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