#include "../common/Logger.h"
#include "../common/Config.h"
#include "Module.h"
#include "Exception.h"
#include <boost/lexical_cast.hpp>
#include <sstream>
#include <string>
#include <iostream>
Go to the source code of this file.
Macros | |
#define | ABS(x) std::abs( x ) |
Absolute value. More... | |
#define | MAX(x, y) std::max( x , y ) |
Maximum of two values. More... | |
#define | MIN(x, y) std::min( x , y ) |
Minimum of two values. More... | |
#define | ROUND(x) ( ( (x) >= 0 ) ? (long int)( (x) + 0.5 ) : (long int)( (x) - 0.5 ) ) |
Minimum of two values. More... | |
#define | TERP_CHECK_EPS(value1, value2, eps, message) |
Checks if two values are equal ( within an EPS ) and throws an exception if not. More... | |
#define | TERP_CHECK_EQUAL(value1, value2, message) |
Checks if two values are equal and throws an exception if not. More... | |
#define | TERP_CHECK_NOT_EQUAL(value1, value2, message) |
Checks if two values are diferent and throws an exception if not. More... | |
#define | TERP_DEBUG_MODE |
Debug mode selection based on NDEBUG define. More... | |
#define | TERP_DEBUG_TRUE_OR_RETURN_FALSE(value, message) TERP_TRUE_OR_RETURN_FALSE( value , message ); |
Checks if value is true. For false values a warning message will be logged and a return of context with false value will be done. More... | |
#define | TERP_DEBUG_TRUE_OR_THROW(value, message) TERP_TRUE_OR_THROW( value , message ); |
Checks if value is true and throws an exception if not. More... | |
#define | TERP_ENABLE_STDOUT_LOG |
STDOUT logging selection flag. More... | |
#define | TERP_FALSE_OR_LOG(value, message) |
Checks if value is false and logs an warning message if not. More... | |
#define | TERP_FALSE_OR_RETURN(value, message) |
Checks if value is false. For true values a warning message will be logged and a return of context will be done. More... | |
#define | TERP_FALSE_OR_RETURN_FALSE(value, message) |
Checks if value is false. For true values a warning message will be logged and a return of context with false value will be done. More... | |
#define | TERP_LOG_AND_RETURN(message) |
Logs a warning message will and return. More... | |
#define | TERP_LOG_AND_RETURN_FALSE(message) |
Logs a warning message will and return false. More... | |
#define | TERP_LOG_AND_THROW(message) |
Logs a error message and throws. More... | |
#define | TERP_LOGERR(message) |
Logs an error message. More... | |
#define | TERP_LOGERR_STDOUT(message) |
Logs a error message to stderr. More... | |
#define | TERP_LOGMSG(message) |
Logs a message. More... | |
#define | TERP_LOGMSG_STDOUT(message) |
Logs a message to stdout. More... | |
#define | TERP_LOGWARN(message) |
Logs a warning message. More... | |
#define | TERP_LOGWARN_STDOUT(message) |
Logs a warning message to stdout. More... | |
#define | TERP_NOT_IMPLEMENTED TERP_LOG_AND_THROW( "Not Implemented." ); |
Throws an exception for not implemented source. More... | |
#define | TERP_TRUE_OR_LOG(value, message) |
! * More... | |
#define | TERP_TRUE_OR_RETURN(value, message) |
Checks if value is true. For false values a warning message will be logged and a return of context will be done. More... | |
#define | TERP_TRUE_OR_RETURN_FALSE(value, message) |
Checks if value is true. For false values a warning message will be logged and a return of context with false value will be done. More... | |
#define | TERP_TRUE_OR_THROW(value, message) |
Checks if value is true and throws an exception if not. More... | |
#define | TERP_WATCH(variable) |
Variable watching. More... | |
#define ABS | ( | x | ) | std::abs( x ) |
Absolute value.
Definition at line 402 of file Macros.h.
Referenced by te::rp::Segmenter::genImageHCutOffProfile(), and te::rp::Segmenter::genImageVCutOffProfile().
#define MAX | ( | x, | |
y | |||
) | std::max( x , y ) |
#define MIN | ( | x, | |
y | |||
) | std::min( x , y ) |
#define ROUND | ( | x | ) | ( ( (x) >= 0 ) ? (long int)( (x) + 0.5 ) : (long int)( (x) - 0.5 ) ) |
Minimum of two values.
Definition at line 395 of file Macros.h.
Referenced by te::rp::TiePointsLocatorMoravecStrategy::generateCorrelationFeatures(), and te::rp::TiePointsLocatorSURFStrategy::generateSurfFeatures().
#define TERP_CHECK_EPS | ( | value1, | |
value2, | |||
eps, | |||
message | |||
) |
#define TERP_CHECK_EQUAL | ( | value1, | |
value2, | |||
message | |||
) |
Checks if two values are equal and throws an exception if not.
value1 | Value to be checked. |
value2 | Value to be checked. |
message | Message to be logged. |
#define TERP_CHECK_NOT_EQUAL | ( | value1, | |
value2, | |||
message | |||
) |
Checks if two values are diferent and throws an exception if not.
value1 | Value to be checked. |
value2 | Value to be checked. |
message | Message to be logged. |
#define TERP_DEBUG_MODE |
#define TERP_DEBUG_TRUE_OR_RETURN_FALSE | ( | value, | |
message | |||
) | TERP_TRUE_OR_RETURN_FALSE( value , message ); |
Checks if value is true. For false values a warning message will be logged and a return of context with false value will be done.
value | Value to be checked. |
message | Message to be logged. |
Definition at line 371 of file Macros.h.
Referenced by te::rp::GeoMosaic::execute(), and te::rp::TiePointsMosaic::execute().
#define TERP_DEBUG_TRUE_OR_THROW | ( | value, | |
message | |||
) | TERP_TRUE_OR_THROW( value , message ); |
Checks if value is true and throws an exception if not.
value | Value to be checked. |
message | Message to be logged. |
Definition at line 356 of file Macros.h.
Referenced by te::rp::Filter::DilationFilter(), te::rp::Filter::ErosionFilter(), te::rp::Blender::euclideanDistanceMethodImp(), te::rp::TiePointsLocator::execute(), te::rp::ClassifierMAPStrategy::execute(), te::rp::ClassifierSAMStrategy::execute(), te::rp::GeoMosaic::execute(), te::rp::Segmenter::execute(), te::rp::TiePointsLocatorSURFStrategy::generateSurfFeatures(), te::rp::Segmenter::genImageHCutOffProfile(), te::rp::Segmenter::genImageVCutOffProfile(), te::rp::Blender::getBlendedValues(), te::rp::SegmenterRegionGrowingStrategy::BaatzMerger::getDissimilarity(), te::rp::ClassifierMAPStrategy::getPrioriProbabilities(), te::rp::Matrix< TemplateElementType >::getScanLine(), te::rp::SegmenterRegionGrowingStrategy::getTouchingEdgeLength(), te::rp::Blender::initialize(), te::rp::Filter::MeanFilter(), te::rp::Filter::MedianFilter(), te::rp::Filter::ModeFilter(), te::rp::Matrix< te::rp::SegmenterRegionGrowingSegment >::operator()(), te::rp::Filter::RobertsFilter(), te::rp::Segmenter::segmenterThreadEntry(), te::rp::Filter::SobelFilter(), te::rp::Blender::sumMethodImp(), and te::rp::Filter::UserDefinedFilter().
#define TERP_ENABLE_STDOUT_LOG |
#define TERP_FALSE_OR_LOG | ( | value, | |
message | |||
) |
Checks if value is false and logs an warning message if not.
value | Value to be checked. |
message | Message to be logged. |
#define TERP_FALSE_OR_RETURN | ( | value, | |
message | |||
) |
Checks if value is false. For true values a warning message will be logged and a return of context will be done.
value | Value to be checked. |
message | Message to be logged. |
#define TERP_FALSE_OR_RETURN_FALSE | ( | value, | |
message | |||
) |
Checks if value is false. For true values a warning message will be logged and a return of context with false value will be done.
value | Value to be checked. |
message | Message to be logged. |
#define TERP_LOG_AND_RETURN | ( | message | ) |
Logs a warning message will and return.
message | Message to be logged. |
#define TERP_LOG_AND_RETURN_FALSE | ( | message | ) |
Logs a warning message will and return false.
message | Message to be logged. |
Definition at line 236 of file Macros.h.
Referenced by te::rp::ArithmeticOperations::execBinaryOperator(), te::rp::Contrast::execDecorrelationEnhancement(), te::rp::PCAFusion::execute(), te::rp::GeoMosaic::execute(), te::rp::Filter::execute(), te::rp::TiePointsMosaic::execute(), te::rp::SequenceMosaic::execute(), te::rp::Contrast::execute(), te::rp::ArithmeticOperations::executeString(), te::rp::TiePointsLocator::initialize(), te::rp::PCAFusion::loadRessampledRaster(), te::rp::FeederConstRasterDirectory::moveNext(), and te::rp::Matrix< TemplateElementType >::reset().
#define TERP_LOG_AND_THROW | ( | message | ) |
Logs a error message and throws.
message | Message to be logged. |
Definition at line 138 of file Macros.h.
Referenced by te::rp::FeederConstRasterDirectory::applyGeometryRestriction(), te::rp::TiePointsLocator::execute(), te::rp::SegmenterRegionGrowingStrategy::execute(), te::rp::Filter::execute(), te::rp::Contrast::execute(), te::rp::SegmenterRegionGrowingStrategy::getMemUsageEstimation(), te::rp::srf::getSRF(), te::rp::Blender::initialize(), te::rp::Contrast::initialize(), te::rp::SegmenterRegionGrowingStrategy::initializeSegments(), and te::rp::Blender::setBlendFunctionPonter().
#define TERP_LOGERR | ( | message | ) |
Logs an error message.
message | Message to be logged. |
Definition at line 116 of file Macros.h.
Referenced by te::rp::Matrix< TemplateElementType >::allocateDiskLines(), and te::rp::Matrix< TemplateElementType >::createNewDiskFile().
#define TERP_LOGERR_STDOUT | ( | message | ) |
#define TERP_LOGMSG | ( | message | ) |
Logs a message.
message | Message to be logged. |
#define TERP_LOGMSG_STDOUT | ( | message | ) |
#define TERP_LOGWARN | ( | message | ) |
Logs a warning message.
message | Message to be logged. |
Definition at line 127 of file Macros.h.
Referenced by te::rp::FeederConstRasterDirectory::applyGeometryRestriction(), te::rp::MixtureModel::initialize(), te::rp::FeederConstRasterDirectory::moveTo(), and te::rp::FeederConstRasterDirectory::reset().
#define TERP_LOGWARN_STDOUT | ( | message | ) |
#define TERP_NOT_IMPLEMENTED TERP_LOG_AND_THROW( "Not Implemented." ); |
#define TERP_TRUE_OR_LOG | ( | value, | |
message | |||
) |
! *
Checks if value is true and logs an warning message if not.
value | Value to be checked. @param message Message to be logged. |
#define TERP_TRUE_OR_RETURN | ( | value, | |
message | |||
) |
Checks if value is true. For false values a warning message will be logged and a return of context will be done.
value | Value to be checked. |
message | Message to be logged. |
#define TERP_TRUE_OR_RETURN_FALSE | ( | value, | |
message | |||
) |
Checks if value is true. For false values a warning message will be logged and a return of context with false value will be done.
value | Value to be checked. |
message | Message to be logged. |
Definition at line 183 of file Macros.h.
Referenced by te::rp::TiePointsLocatorMoravecStrategy::applyMeanFilter(), te::rp::Skeleton::applyVecDiffusion(), te::rp::Blender::blendIntoRaster1(), te::rp::Segmenter::createCutOffLinesTiff(), te::rp::TiePointsLocatorSURFStrategy::createIntegralImage(), te::rp::Matrix< TemplateElementType >::createNewDiskFile(), te::rp::CreateRasterFileFromMatrix(), te::rp::Skeleton::createSkeletonStrengthMap(), te::rp::ArithmeticOperations::execBinaryOperator(), te::rp::Contrast::execDecorrelationEnhancement(), te::rp::ClassifierDummyStrategy::execute(), te::rp::MixtureModelLinearStrategy::execute(), te::rp::MixtureModelPCAStrategy::execute(), te::rp::TiePointsLocator::execute(), te::rp::ClassifierKMeansStrategy::execute(), te::rp::ClassifierEMStrategy::execute(), te::rp::ClassifierMAPStrategy::execute(), te::rp::ClassifierSAMStrategy::execute(), te::rp::PCAFusion::execute(), te::rp::SegmenterRegionGrowingStrategy::execute(), te::rp::GeoMosaic::execute(), te::rp::Register::execute(), te::rp::IHSFusion::execute(), te::rp::ArithmeticOperations::execute(), te::rp::Filter::execute(), te::rp::ClassifierISOSegStrategy::execute(), te::rp::TiePointsMosaic::execute(), te::rp::WisperFusion::execute(), te::rp::Skeleton::execute(), te::rp::MixtureModel::execute(), te::rp::SequenceMosaic::execute(), te::rp::Classifier::execute(), te::rp::Segmenter::execute(), te::rp::Contrast::execute(), te::rp::TiePointsLocatorMoravecStrategy::executeMatchingByCorrelation(), te::rp::TiePointsLocatorSURFStrategy::executeMatchingByEuclideanDist(), te::rp::ArithmeticOperations::executeString(), te::rp::TiePointsLocatorMoravecStrategy::generateCorrelationFeatures(), te::rp::TiePointsLocatorSURFStrategy::generateSurfFeatures(), te::rp::Skeleton::getEdgeStrengthMap(), te::rp::Skeleton::getGradientMaps(), te::rp::TiePointsLocatorMoravecStrategy::getMatchedInterestPoints(), te::rp::TiePointsLocatorSURFStrategy::getMatchedInterestPoints(), te::rp::ClassifierDummyStrategy::initialize(), te::rp::ClassifierKMeansStrategy::initialize(), te::rp::ClassifierEMStrategy::initialize(), te::rp::ClassifierMAPStrategy::initialize(), te::rp::TiePointsLocator::initialize(), te::rp::ClassifierSAMStrategy::initialize(), te::rp::Blender::initialize(), te::rp::SegmenterRegionGrowingStrategy::initialize(), te::rp::TiePointsLocatorMoravecStrategy::initialize(), te::rp::TiePointsLocatorSURFStrategy::initialize(), te::rp::PCAFusion::initialize(), te::rp::GeoMosaic::initialize(), te::rp::Register::initialize(), te::rp::ClassifierISOSegStrategy::initialize(), te::rp::IHSFusion::initialize(), te::rp::ArithmeticOperations::initialize(), te::rp::Filter::initialize(), te::rp::TiePointsMosaic::initialize(), te::rp::WisperFusion::initialize(), te::rp::Skeleton::initialize(), te::rp::MixtureModel::initialize(), te::rp::SequenceMosaic::initialize(), te::rp::Classifier::initialize(), te::rp::Segmenter::initialize(), te::rp::Contrast::initialize(), te::rp::TiePointsLocatorStrategy::loadRasterData(), and te::rp::IHSFusion::saveIHSData().
#define TERP_TRUE_OR_THROW | ( | value, | |
message | |||
) |
Checks if value is true and throws an exception if not.
value | Value to be checked. |
message | Message to be logged. |
Definition at line 149 of file Macros.h.
Referenced by te::rp::FeederConstRasterDirectory::applyGeometryRestriction(), te::rp::Segmenter::calcBestBlockSize(), te::rp::Segmenter::createCutOffLinesTiff(), te::rp::TiePointsLocatorStrategy::createTifFromMatrix(), te::rp::Skeleton::createTifFromVecField(), te::rp::TiePointsLocator::execute(), te::rp::PCAFusion::execute(), te::rp::GeoMosaic::execute(), te::rp::Register::execute(), te::rp::ArithmeticOperations::execute(), te::rp::IHSFusion::execute(), te::rp::Filter::execute(), te::rp::TiePointsMosaic::execute(), te::rp::WisperFusion::execute(), te::rp::Skeleton::execute(), te::rp::SequenceMosaic::execute(), te::rp::SegmenterRegionGrowingStrategy::exportSegs2Tif(), te::rp::TiePointsLocatorStrategy::features2Tiff(), te::rp::FeederConstRasterDirectory::FeederConstRasterDirectory(), te::rp::FeederConstRasterInfo::FeederConstRasterInfo(), te::rp::TiePointsLocatorMoravecStrategy::getAutoMaxTiePointsNumber(), te::rp::TiePointsLocatorSURFStrategy::getAutoMaxTiePointsNumber(), te::rp::SegmenterRegionGrowingStrategy::getMemUsageEstimation(), te::rp::SegmenterRegionGrowingStrategy::getOptimalBlocksOverlapSize(), te::rp::Matrix< TemplateElementType >::getScanLine(), te::rp::Blender::initialize(), te::rp::PCAFusion::initialize(), te::rp::GeoMosaic::initialize(), te::rp::Register::initialize(), te::rp::IHSFusion::initialize(), te::rp::ArithmeticOperations::initialize(), te::rp::TiePointsMosaic::initialize(), te::rp::WisperFusion::initialize(), te::rp::Skeleton::initialize(), te::rp::SequenceMosaic::initialize(), te::rp::TiePointsLocatorSURFStrategy::locateSurfInterestPointsThreadEntry(), te::rp::SegmenterRegionGrowingStrategy::mergeSegments(), te::rp::Matrix< TemplateElementType >::operator=(), and te::rp::Segmenter::segmenterThreadEntry().
#define TERP_WATCH | ( | variable | ) |
Variable watching.
variable | Variable to be logged. |