27 #include "../Config.h" 35 #define BOOST_TEST_NO_MAIN 36 #include <boost/test/unit_test.hpp> 37 #include <boost/shared_ptr.hpp> 45 std::map<std::string, std::string> auxRasterInfo;
47 auxRasterInfo[
"URI"] = TERRALIB_DATA_DIR
"/geotiff/pattern1.tif";
50 BOOST_CHECK( inputRasterPtrPointer.get() );
52 auxRasterInfo.clear();
53 auxRasterInfo[
"MEM_SRC_RASTER_DRIVER_TYPE"] =
"MEM";
54 auxRasterInfo[
"FORCE_MEM_DRIVER"] =
"TRUE";
55 inputRasterPtrPointer.reset( inputRasterPtrPointer->resample(
57 BOOST_CHECK( inputRasterPtrPointer.get() );
64 algoInputParams.m_inputRasterBand = 0;
65 algoInputParams.m_inputMaskRasterPtr = 0;
66 algoInputParams.m_diffusionThreshold = 0.5;
67 algoInputParams.m_diffusionRegularization = 0.5;
68 algoInputParams.m_diffusionMaxIterations = 0;
69 algoInputParams.m_enableMultiThread =
true;
70 algoInputParams.m_skeletonThreshold = 0.75;
74 algoOutputParams.
m_rInfo[
"URI"] =
"terralib_unittest_rp_skeleton_test1.tif";
75 algoOutputParams.
m_rType =
"GDAL";
81 BOOST_CHECK( algorithmInstance.
initialize( algoInputParams ) );
82 BOOST_CHECK( algorithmInstance.
execute( algoOutputParams ) );
85 BOOST_AUTO_TEST_SUITE_END()
Near neighborhood interpolation method.
Skeleton output parameters.
std::string m_rType
Output raster data source type (as described in te::raster::RasterFactory ).
bool execute(AlgorithmOutputParameters &outputParams) _NOEXCEPT_OP(false)
Executes the algorithm using the supplied parameters.
BOOST_AUTO_TEST_SUITE(skeleton_tests) BOOST_AUTO_TEST_CASE(pattern1_test)
This file contains include headers for the TerraLib Raster Processing module.
std::map< std::string, std::string > m_rInfo
The necessary information to create the output rasters (as described in te::raster::RasterFactory).
Creation of skeleton images.
BOOST_AUTO_TEST_CASE(encoding_test_utf8_latin1)
bool initialize(const AlgorithmInputParameters &inputParams) _NOEXCEPT_OP(false)
Initialize the algorithm instance making it ready for execution.
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.