OTB  6.7.0
Orfeo Toolbox
Namespaces | Macros
otbMacro.h File Reference
#include "itkMacro.h"
#include "itkObject.h"
#include "otbConfigure.h"
#include "otbLogger.h"
+ Include dependency graph for otbMacro.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 otb
 

Macros

#define otbClassContext(x)   << this->GetNameOfClass() << " (" << this << "): " x
 
#define otbControlConditionTestMacro(condition, message)
 
#define otbDebugMacro(x)   otbLogMacro(Debug,otbFileContext(otbClassContext(x)))
 
#define otbFileContext(x)   << "file " __FILE__ ", line " << __LINE__<<", " x
 
#define otbGenericExceptionMacro(T, x)
 
#define otbGenericMsgDebugMacro(x)   otbLogMacro(Debug,x)
 
#define otbGenericMsgTestingMAcro(x)   otbLogMacro(Info,"[testing] "<<x)
 
#define otbGenericWarningMacro(x)   otbLogMacro(Warning,otbFileContext(x))
 
#define otbLogMacro(level, msg)
 
#define otbMsgDebugMacro(x)   otbLogMacro(Debug,otbFileContext(x))
 
#define otbMsgDevMacro(x)   otbLogMacro(Debug,otbFileContext(x))
 
#define otbTestingCheckNotValidCommand(command)
 
#define otbUnusedMacro(x)   do { (void)sizeof(x); } while(0)
 
#define otbUseInDebug(name)
 
#define otbUseInRelease(name)   name
 
#define otbWarningMacro(x)   otbLogMacro(Warning,otbFileContext(otbClassContext(x)))
 
#define otbSetObjectMemberMacro(object, name, type)
 
#define otbGetObjectMemberMacro(object, name, type)
 
#define otbGetObjectMemberConstMacro(object, name, type)
 
#define otbGetObjectMemberConstReferenceMacro(object, name, type)
 
#define otbTestingCheckValidCommand(command)
 

Macro Definition Documentation

#define otbClassContext (   x)    << this->GetNameOfClass() << " (" << this << "): " x

Definition at line 50 of file otbMacro.h.

#define otbControlConditionTestMacro (   condition,
  message 
)
Value:
{ \
if ((condition)) itkGenericExceptionMacro(<< message); \
}

This macro is used to control condition. It use ONLY by the OTB developers

Definition at line 74 of file otbMacro.h.

#define otbDebugMacro (   x)    otbLogMacro(Debug,otbFileContext(otbClassContext(x)))
#define otbFileContext (   x)    << "file " __FILE__ ", line " << __LINE__<<", " x

Definition at line 47 of file otbMacro.h.

#define otbGenericExceptionMacro (   T,
 
)
Value:
{ \
std::ostringstream message; \
message << "otb::ERROR: " x; \
T e_(__FILE__, __LINE__, message.str(),ITK_LOCATION); \
throw e_;\
}

Definition at line 143 of file otbMacro.h.

#define otbGenericMsgDebugMacro (   x)    otbLogMacro(Debug,x)
#define otbGenericMsgTestingMAcro (   x)    otbLogMacro(Info,"[testing] "<<x)

Definition at line 69 of file otbMacro.h.

#define otbGenericWarningMacro (   x)    otbLogMacro(Warning,otbFileContext(x))

Definition at line 68 of file otbMacro.h.

#define otbGetObjectMemberConstMacro (   object,
  name,
  type 
)
Value:
virtual type Get ## name () const \
{ \
itkDebugMacro("returning " << # name " of " << this->m_ ## object->Get ## name()); \
return this->m_ ## object->Get ## name(); \
}
*brief Mask an image with the negative of a mask **This class is templated over the types of the *input image type

Get built-in type. Creates member Get"name"() (e.g., GetVisibility()); This is the "const" form of the itkGetMacro. It should be used unless the member can be changed through the "Get" access routine.

Definition at line 101 of file otbMacro.h.

#define otbGetObjectMemberConstReferenceMacro (   object,
  name,
  type 
)
Value:
virtual const type &Get ## name () const \
{ \
itkDebugMacro("returning " << # name " of " << this->m_ ## object->Get ## name()); \
return this->m_ ## object->Get ## name(); \
}
*brief Mask an image with the negative of a mask **This class is templated over the types of the *input image type

Get built-in type. Creates member Get"name"() (e.g., GetVisibility()); This is the "const" form of the itkGetMacro. It should be used unless the member can be changed through the "Get" access routine. This versions returns a const reference to the variable.

Definition at line 113 of file otbMacro.h.

#define otbGetObjectMemberMacro (   object,
  name,
  type 
)
Value:
virtual type Get ## name () \
{ \
itkDebugMacro("returning " << # name " of " << this->m_ ## object->Get ## name()); \
return this->m_ ## object->Get ## name(); \
}
*brief Mask an image with the negative of a mask **This class is templated over the types of the *input image type

Get built-in type. Creates member Get"name"() (e.g., GetVisibility());

Definition at line 90 of file otbMacro.h.

#define otbLogMacro (   level,
  msg 
)
#define otbMsgDebugMacro (   x)    otbLogMacro(Debug,otbFileContext(x))

Definition at line 64 of file otbMacro.h.

Referenced by otb::LibSVMMachineLearningModel< TInputValue, TTargetValue >::BuildProblem(), otb::ConfusionMatrixCalculator< TRefListLabel, TProdListLabel >::Compute(), otb::LeastSquareAffineTransformEstimator< TPoint >::Compute(), otb::BayesianFusionFilter< TInputMultiSpectralImage, TInputMultiSpectralInterpImage, TInputPanchroImage, TOutputImage >::ComputeInternalStatistics(), otb::LibSVMMachineLearningModel< TInputValue, TTargetValue >::ConsistencyCheck(), otb::PersistentSamplingFilterBase< TInputImage, TMaskImage >::GatherOutputVectors(), otb::ImageToEdgePathFilter< TInputImage, TOutputPath >::GenerateData(), otb::ImageMultiSegmentationToRCC8GraphFilter< TInputImage, TOutputGraph >::GenerateData(), otb::SOMClassifier< TSample, TSOMMap, TLabel >::GenerateData(), otb::PersistentImageToOGRLayerFilter< TImage >::GenerateData(), otb::ListSampleToVariableDimensionHistogramGenerator< TListSample, THistogramMeasurement, TFrequencyContainer >::GenerateData(), otb::PersistentImageToOGRDataFilter< TImage >::GenerateData(), otb::ListSampleToHistogramListGenerator< TListSample, THistogramMeasurement, TFrequencyContainer >::GenerateData(), otb::SparseUnmixingImageFilter< TInputImage, TOutputImage, VNbInputImage, TPrecision, TMotherWaveletOperator >::GenerateData(), otb::ImageSeriesFileReader< Image< TPixel, 2 >, Image< TInternalPixel, 2 > >::GenerateData(), otb::ImageSeriesFileReader< Image< TPixel, 2 >, VectorImage< TInternalPixel, 2 > >::GenerateData(), otb::ImageSeriesFileReader< VectorImage< TPixel, 2 >, VectorImage< TInternalPixel, 2 > >::GenerateData(), otb::NAPCAImageFilter< TInputImage, TOutputImage, TNoiseImageFilter, TDirectionOfTransformation >::GenerateTransformationMatrix(), otb::FastICAImageFilter< TInputImage, TOutputImage, TDirectionOfTransformation >::GenerateTransformationMatrix(), otb::PCAImageFilter< TInputImage, TOutputImage, TDirectionOfTransformation >::GenerateTransformationMatrix(), otb::SEMClassifier< TInputImage, TOutputImage >::InitParameters(), otb::SEMClassifier< TInputImage, TOutputImage >::Modified(), otb::LibSVMMachineLearningModel< TInputValue, TTargetValue >::OptimizeParameters(), otb::SEMClassifier< TInputImage, TOutputImage >::PerformStochasticProcess(), otb::PersistentImageToOGRLayerSegmentationFilter< TImageType, TSegmentationFilter >::ProcessTile(), otb::SEMClassifier< TInputImage, TOutputImage >::SetClassLabels(), otb::InverseLogPolarTransform< TScalarType >::SetParameters(), otb::LogPolarTransform< TScalarType >::SetParameters(), otb::SOM< TListSample, TMap, TSOMLearningBehaviorFunctor, TSOMNeighborhoodBehaviorFunctor >::Step(), and otb::PolygonListToRCC8GraphFilter< TPolygonList, TOutputGraph >::ThreadedGenerateData().

#define otbMsgDevMacro (   x)    otbLogMacro(Debug,otbFileContext(x))

Definition at line 66 of file otbMacro.h.

Referenced by otb::MarkovRandomFieldFilter< TInputImage, TClassifiedImage >::ApplyMarkovRandomFieldFilter(), otb::PolygonListToRCC8GraphFilter< TPolygonList, TOutputGraph >::BeforeThreadedGenerateData(), otb::ImageToRadianceImageFilter< TInputImage, TOutputImage >::BeforeThreadedGenerateData(), otb::RadianceToImageImageFilter< TInputImage, TOutputImage >::BeforeThreadedGenerateData(), otb::ReflectanceToImageImageFilter< TInputImage, TOutputImage >::BeforeThreadedGenerateData(), otb::Multi3DMapToDEMFilter< T3DImage, TMaskImage, TOutputDEMImage >::BeforeThreadedGenerateData(), otb::RadianceToReflectanceImageFilter< TInputImage, TOutputImage >::BeforeThreadedGenerateData(), otb::ImageToReflectanceImageFilter< TInputImage, TOutputImage >::BeforeThreadedGenerateData(), otb::StreamingTraits< TImage >::CalculateNeededRadiusForInterpolator(), otb::StreamingTraits< otb::VectorImage< TPixel, VImageDimension > >::CalculateNeededRadiusForInterpolator(), otb::DecisionTree< AttributeValueType, LabelType >::Decide(), otb::SVMMarginSampler< TSample, TModel >::DoMarginSampling(), otb::ImageToOSMVectorDataGenerator< TImage >::EstimateImageExtent(), otb::OrientationPathFunction< TInputPath, TOutput >::Evaluate(), otb::CompacityPathFunction< TInputPath, TOutput >::Evaluate(), otb::HuPathFunction< TInputPath, TOutput, TPrecision >::Evaluate(), otb::ComplexMomentPathFunction< TInputPath, TOutput, TPrecision >::Evaluate(), otb::FlusserPathFunction< TInputPath, TOutput, TPrecision >::Evaluate(), otb::LabelToProSailParameters< TLabel >::GenerateData(), otb::ParallelLinePathListFilter< TPath >::GenerateData(), otb::ImageMultiSegmentationToRCC8GraphFilter< TInputImage, TOutputGraph >::GenerateData(), otb::VectorDataTransformFilter< TInputVectorData, TOutputVectorData >::GenerateData(), otb::ListSampleToVariableDimensionHistogramGenerator< TListSample, THistogramMeasurement, TFrequencyContainer >::GenerateData(), otb::VectorDataToVectorDataFilter< TInputVectorData, TOutputVectorData >::GenerateData(), otb::VectorDataExtractROI< TVectorData >::GenerateData(), otb::VCAImageFilter< TVectorImage >::GenerateData(), otb::MorphologicalPyramidSynthesisFilter< TInputImage, TOutputImage >::GenerateData(), otb::ListSampleToHistogramListGenerator< TListSample, THistogramMeasurement, TFrequencyContainer >::GenerateData(), otb::MorphologicalPyramidSegmentationFilter< TInputImage, TOutputImage >::GenerateData(), otb::WaveletTransform< TInputImage, TOutputImage, TFilter, Wavelet::FORWARD >::GenerateData(), otb::VectorDataProjectionFilter< TInputVectorData, TOutputVectorData >::GenerateData(), otb::DisparityMapEstimationMethod< TFixedImage, TMovingImage, TPointSet >::GenerateData(), otb::WaveletTransform< TInputImage, TOutputImage, TFilter, Wavelet::INVERSE >::GenerateData(), otb::WaveletPacketTransform< TInputImage, TOutputImage, TFilter, Wavelet::INVERSE, FullyDecomposedWaveletPacketCost< TInputImage > >::GenerateData(), otb::LineDetectorImageFilterBase< TInputImage, TOutputImage, TOutputImageDirection, TInterpolator >::GenerateInputRequestedRegion(), otb::ConvolutionImageFilter< TInputImage, TOutputImage, TBoundaryCondition, TFilterPrecision >::GenerateInputRequestedRegion(), otb::RasterizeVectorDataFilter< TVectorData, TInputImage, TOutputImage >::GenerateOutputInformation(), otb::VectorDataToLabelImageFilter< TVectorData, TOutputImage >::GenerateOutputInformation(), otb::WaveletPacketTransform< TInputImage, TOutputImage, TFilter, Wavelet::INVERSE, FullyDecomposedWaveletPacketCost< TInputImage > >::GenerateOutputInformation(), otb::SVMCrossValidationCostFunction< TModel >::GetDerivative(), otb::MultiChannelRadiometricImageFilter< TInputImage, TOutputImage, TFunction >::GetIndex(), otb::ImageRegionSquareTileSplitter< VImageDimension >::GetNumberOfSplits(), otb::NCCRegistrationFunction< TFixedImage, TMovingImage, TDisplacementField >::InitializeIteration(), otb::SEMClassifier< TInputImage, TOutputImage >::InitParameters(), otb::LibSVMMachineLearningModel< TInputValue, TTargetValue >::OptimizeParameters(), otb::RCC8GraphFileReader< TOutputGraph >::ParseEdge(), otb::RCC8GraphFileReader< TOutputGraph >::ParseVertex(), otb::NumberOfDivisionsTiledStreamingManager< TImage >::PrepareStreaming(), otb::NumberOfDivisionsStrippedStreamingManager< TImage >::PrepareStreaming(), otb::NumberOfLinesStrippedStreamingManager< TImage >::PrepareStreaming(), otb::RAMDrivenTiledStreamingManager< TImage >::PrepareStreaming(), otb::StreamingShrinkStreamingManager< TInputImage >::PrepareStreaming(), otb::VectorDataToLabelMapFilter< TVectorData, TLabelMap >::ProcessNode(), otb::VectorDataExtractROI< TVectorData >::ProjectRegionToInputVectorProjection(), otb::AutoencoderModel< TInputValue, NeuronType >::Save(), otb::MultiChannelRadiometricImageFilter< TInputImage, TOutputImage, TFunction >::SetIndex(), otb::PolygonListToRCC8GraphFilter< TPolygonList, TOutputGraph >::ThreadedGenerateData(), otb::LineDetectorImageFilterBase< TInputImage, TOutputImage, TOutputImageDirection, TInterpolator >::ThreadedGenerateData(), otb::Multi3DMapToDEMFilter< T3DImage, TMaskImage, TOutputDEMImage >::ThreadedGenerateData(), otb::AutoencoderModel< TInputValue, NeuronType >::Train(), otb::AutoencoderModel< TInputValue, NeuronType >::TrainNetwork(), otb::AutoencoderModel< TInputValue, NeuronType >::TrainOneLayer(), otb::AutoencoderModel< TInputValue, NeuronType >::TrainOneSparseLayer(), otb::SimpleParallelTiffWriter< TInputImage >::Update(), otb::ReflectanceToSurfaceReflectanceImageFilter< TInputImage, TOutputImage >::UpdateAtmosphericRadiativeTerms(), otb::SurfaceReflectanceToReflectanceFilter< TInputImage, TOutputImage >::UpdateAtmosphericRadiativeTerms(), otb::SurfaceAdjacencyEffectCorrectionSchemeFilter< TInputImage, TOutputImage >::UpdateAtmosphericRadiativeTerms(), otb::ReflectanceToSurfaceReflectanceImageFilter< TInputImage, TOutputImage >::UpdateFunctors(), otb::ParallelLinePathListFilter< TPath >::VerifyCommonDistanceCondition(), and otb::MapFileProductWriter< TInputImage >::Write().

#define otbSetObjectMemberMacro (   object,
  name,
  type 
)
Value:
virtual void Set ## name (const type _arg) \
{ \
itkDebugMacro("setting member " # name " to " << _arg); \
this->m_ ## object->Set ## name(_arg); \
this->Modified(); \
}

Set built-in type. Creates member Set"name"() (e.g., SetVisibility());

Definition at line 80 of file otbMacro.h.

#define otbTestingCheckNotValidCommand (   command)
Value:
{ \
int result(1); \
try \
{ \
command; \
} \
catch (std::bad_alloc& err) { \
throw err; } \
catch (itk::ExceptionObject&) { std::cout << "Checking not valid Command " << # command " ok." << std::endl; \
result = 0; } \
catch (const std::exception& stde) { \
throw stde; } \
catch (...) \
{ \
std::ostringstream message; \
message << "otb::ERROR Unknown error while running " << # command << " (catch(...) )"; \
::itk::ExceptionObject e_(__FILE__, __LINE__, message.str(), ITK_LOCATION); \
throw e_; \
} \
if (result == 1) \
{ \
std::ostringstream message; \
message << "otb::ERROR: " << # command << " should be throwing an exception."; \
::itk::ExceptionObject e_(__FILE__, __LINE__, message.str(), ITK_LOCATION); \
throw e_; \
} \
}

Definition at line 151 of file otbMacro.h.

#define otbTestingCheckValidCommand (   command)
Value:
{ \
try \
{ \
command; \
} \
catch (const std::exception&) { \
throw; } \
catch (...) \
{ \
std::ostringstream message; \
message << "otb::ERROR Unknown error while running " << # command << " (catch(...) )"; \
::itk::ExceptionObject e_(__FILE__, __LINE__, message.str(), ITK_LOCATION); \
throw e_; \
} \
std::cout << " Checking valid command " << # command " ok." << std::endl; \
}

Testing macro. This macro doesn't throw a exception if the called command generate a itk::ExceptionObject object. For alls others use cases, the macro generate a exception.

Definition at line 124 of file otbMacro.h.

#define otbUnusedMacro (   x)    do { (void)sizeof(x); } while(0)
#define otbUseInDebug (   name)

Definition at line 189 of file otbMacro.h.

#define otbUseInRelease (   name)    name

Definition at line 190 of file otbMacro.h.

#define otbWarningMacro (   x)    otbLogMacro(Warning,otbFileContext(otbClassContext(x)))