27 #include "../../Config.h" 46 #include <QApplication> 125 std::string data_dir = TERRALIB_DATA_DIR;
127 std::map<std::string, std::string> rinfo;
128 rinfo[
"URI"] = data_dir +
"/geotiff/cbers2b_rgb342_crop.tif";
134 std::map<std::string, std::string> outputRasterInfo;
135 outputRasterInfo[
"URI"] = data_dir +
"/geotiff/terralib_example_qt_rp_SegmenterDialog.tif";
142 "GDAL", outputRasterInfo, 0, 0 );
144 dialogInstance.exec();
146 dialogInstance.hide();
150 boost::shared_ptr< te::rst::Raster > outputRasterPtr;
158 std::string data_dir = TERRALIB_DATA_DIR;
160 std::map<std::string, std::string> rinfo;
161 rinfo[
"URI"] = data_dir +
"/geotiff/cbers2b_rgb342_crop.tif";
167 std::map<std::string, std::string> outputRasterInfo;
168 outputRasterInfo[
"URI"] = data_dir +
"/geotiff/terralib_example_qt_rp_ContrastDialog.tif";
175 "GDAL", outputRasterInfo, 0, 0 );
177 dialogInstance.exec();
179 dialogInstance.hide();
183 boost::shared_ptr< te::rst::Raster > outputRasterPtr;
190 std::string data_dir = TERRALIB_DATA_DIR;
192 std::map<std::string, std::string> rinfo;
193 rinfo[
"URI"] = data_dir +
"/geotiff/cbers2b_rgb342_crop.tif";
198 std::map<std::string, std::string> outputRasterInfo;
199 outputRasterInfo[
"URI"] = data_dir +
"/geotiff/terralib_example_qt_rp_ClassifierDialog.tif";
205 std::map<std::string, std::string> segmentedinfo;
206 segmentedinfo[
"URI"] = data_dir +
"/geotiff/terralib_example_qt_rp_SegmenterDialog.tif";
210 std::vector<te::gm::Geometry*> geometries;
212 std::vector<te::gm::Polygon*> inputPolygons;
213 for (
unsigned i = 0; i < geometries.size(); i++)
214 inputPolygons.push_back(static_cast<te::gm::Polygon*> (geometries[i]));
219 dialogInstance.exec();
221 dialogInstance.hide();
224 boost::shared_ptr< te::rst::Raster > outputRasterPtr;
232 std::string data_dir = TERRALIB_DATA_DIR;
234 const std::string dsname(
"cbers2b_rgb342_crop.tif");
235 std::string rinfo (
"file://");
236 rinfo += data_dir +
"/geotiff/cbers2b_rgb342_crop.tif";
242 std::cout << std::endl <<
"Data source openning error";
247 std::map<std::string, std::string> outputRasterInfo;
248 outputRasterInfo[
"URI"] = data_dir +
"/geotiff/terralib_example_qt_rp_MixtureModelDialog.tif";
254 boost::shared_ptr< te::rst::Raster > outputRasterPtr;
257 int main(
int argc,
char** argv)
272 catch(
const std::exception& e)
274 std::cout << std::endl <<
"An exception has occurred: " << e.what() << std::endl;
280 std::cout << std::endl <<
"An unexpected exception has occurred!" << std::endl;
TEGDALEXPORT void Vectorize(GDALRasterBand *band, std::vector< te::gm::Geometry * > &geometries)
Vectorizes a given raster band, using GDALPolygonize function.
void MixtureModelDialogExample(int argc, char **argv)
A dialog used to execute image classification.
static std::unique_ptr< DataSource > make(const std::string &driver, const te::core::URI &connInfo)
Include files for Core Plugin Library.
This class represents Raster data.
int main(int argc, char **argv)
static te::dt::Date ds(2010, 01, 01)
void ContrastDialogExample(int argc, char **argv)
void SegmenterDialogExample(int argc, char **argv)
void ClassifierDialogExample(int argc, char **argv)
Proxy file for the real global configuration of TerraLib examples.
A dialog used to execute image segmentation.
This is the abstract factory for Rasters.
static PluginManager & instance()
Access the singleton.
void finalize()
It finalizes the TerraLib Platform.
static TerraLib & getInstance()
It returns a reference to the singleton instance.
A dialog used to execute mixture model decomposition.
A factory for data sources.
void initialize()
It initializes the TerraLib Platform.
void TiePointsLocatorDialogExample(int argc, char **argv)
This file contains include headers for the TerraLib Common Runtime module.
This file contains include headers for the Vector Geometry model of TerraLib.
void clear()
Stop and unload all plugins, then clear the internal list of plugins.
A dialog used to execute image contrast enhencement.
This file contains include headers for the Data Access module of TerraLib.
A dialog used to execute tie points location.
void LoadModules()
Load terralib modules.
Utilitary functions to access GDAL and match some of its concepts to TerraLib concepts.
static Raster * open(const std::map< std::string, std::string > &rinfo, te::common::AccessPolicy p=te::common::RAccess)
It opens a raster with the given parameters and default raster driver.