All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Skeleton.cpp File Reference

Creation of skeleton imagems. More...

#include "Skeleton.h"
#include "Macros.h"
#include "Functions.h"
#include "../raster/Band.h"
#include "../raster/Utils.h"
#include "../common/PlatformUtils.h"
#include <boost/lexical_cast.hpp>
#include <boost/scoped_array.hpp>
#include <memory>
#include <cmath>
#include <cstring>

Go to the source code of this file.

Namespaces

 te
 URI C++ Library.
 
 te::rp
 Namespace for Raster Processing module of TerraLib.
 

Macros

#define DIFFUSENEIGHBOR(neighborRow, neighborCol)
 
#define SKELSTRENGTHNEIGHBOR(neighborRow, neighborCol)
 

Detailed Description

Creation of skeleton imagems.

Definition in file Skeleton.cpp.

Macro Definition Documentation

#define DIFFUSENEIGHBOR (   neighborRow,
  neighborCol 
)
Value:
if( bufferMag[ neighborRow ][ neighborCol ] >= centerMag ) \
{ \
++validNeigborsNumber; \
newCenterX += bufferX[ neighborRow ][ neighborCol ]; \
newCenterY += bufferY[ neighborRow ][ neighborCol ]; \
}

Definition at line 40 of file Skeleton.cpp.

Referenced by te::rp::Skeleton::applyVecDiffusionThreadEntry().

#define SKELSTRENGTHNEIGHBOR (   neighborRow,
  neighborCol 
)
Value:
neiX = inputX[ neighborRow ][ neighborCol ]; \
neiY = inputY[ neighborRow ][ neighborCol ]; \
diffX = neiX - centerX; \
diffY = neiY - centerY; \
diffMag = std::sqrt( ( diffX * diffX ) + ( diffY * diffY ) ); \
if( diffMag != 0.0 ) \
{ \
strength += ( ( ( diffX * neiX ) + ( diffY * neiY ) ) / diffMag ); \
}

Definition at line 48 of file Skeleton.cpp.

Referenced by te::rp::Skeleton::createSkeletonStrengthMap().