OTB  7.2.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:

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)
 
#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

◆ otbClassContext

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

Definition at line 49 of file otbMacro.h.

◆ otbControlConditionTestMacro

#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 72 of file otbMacro.h.

◆ otbDebugMacro

#define otbDebugMacro (   x)    otbLogMacro(Debug, otbFileContext(otbClassContext(x)))

◆ otbFileContext

#define otbFileContext (   x)    << "file " __FILE__ ", line " << __LINE__ << ", " x

Definition at line 47 of file otbMacro.h.

◆ otbGenericExceptionMacro

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

Definition at line 144 of file otbMacro.h.

◆ otbGenericMsgDebugMacro

#define otbGenericMsgDebugMacro (   x)    otbLogMacro(Debug, x)

◆ otbGenericMsgTestingMAcro

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

Definition at line 67 of file otbMacro.h.

◆ otbGenericWarningMacro

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

Definition at line 66 of file otbMacro.h.

◆ otbGetObjectMemberConstMacro

#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(); \
}
static constexpr char const * name() noexcept

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 100 of file otbMacro.h.

Referenced by otb::Wrapper::InputFilenameParameter::HasValue(), otb::Wrapper::OutputFilenameParameter::HasValue(), otb::Wrapper::DirectoryParameter::HasValue(), otb::Wrapper::DirectoryParameter::SetActive(), otb::GenericRSResampleImageFilter< TInputImage, TOutputImage >::SetInterpolator(), otb::StreamingResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType >::SetInterpolator(), and otb::StreamingResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType >::SetTransform().

◆ otbGetObjectMemberConstReferenceMacro

#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(); \
}
static constexpr char const * name() noexcept

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 112 of file otbMacro.h.

Referenced by otb::GenericRSResampleImageFilter< TInputImage, TOutputImage >::SetOutputOrigin(), and otb::StreamingResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType >::SetOutputOrigin().

◆ otbGetObjectMemberMacro

#define otbGetObjectMemberMacro (   object,
  name,
  type 
)

◆ otbLogMacro

#define otbLogMacro (   level,
  msg 
)

◆ otbMsgDebugMacro

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

Definition at line 62 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 >::GatherOutputVectors(), otb::ImageToEdgePathFilter< TInputImage, TOutputPath >::GenerateData(), otb::SOMClassifier< TSample, TSOMMap, TLabel >::GenerateData(), otb::PersistentImageToOGRLayerFilter< TImageType >::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::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(), and otb::SOM< TListSample, TMap, TSOMLearningBehaviorFunctor, TSOMNeighborhoodBehaviorFunctor >::Step().

◆ otbMsgDevMacro

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

Definition at line 64 of file otbMacro.h.

Referenced by otb::MarkovRandomFieldFilter< TInputImage, TClassifiedImage >::ApplyMarkovRandomFieldFilter(), otb::GridResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecision >::BeforeThreadedGenerateData(), otb::ImageToRadianceImageFilter< TInputImage, TOutputImage >::BeforeThreadedGenerateData(), otb::RadianceToImageImageFilter< TInputImage, TOutputImage >::BeforeThreadedGenerateData(), otb::Multi3DMapToDEMFilter< T3DImage, TMaskImage, TOutputDEMImage >::BeforeThreadedGenerateData(), otb::ReflectanceToRadianceImageFilter< TInputImage, TOutputImage >::BeforeThreadedGenerateData(), otb::ReflectanceToImageImageFilter< TInputImage, TOutputImage >::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::ComplexMomentPathFunction< TInputPath, TOutput, TPrecision >::Evaluate(), otb::HuPathFunction< TInputPath, TOutput, TPrecision >::Evaluate(), otb::FlusserPathFunction< TInputPath, TOutput, TPrecision >::Evaluate(), otb::LabelToProSailParameters< TLabel >::GenerateData(), otb::VectorDataTransformFilter< TInputVectorData, TOutputVectorData >::GenerateData(), otb::ListSampleToVariableDimensionHistogramGenerator< TListSample, THistogramMeasurement, TFrequencyContainer >::GenerateData(), otb::VectorDataToVectorDataFilter< TVectorData, TVectorData >::GenerateData(), otb::VCAImageFilter< TVectorImage >::GenerateData(), otb::VectorDataExtractROI< TVectorData >::GenerateData(), otb::ListSampleToHistogramListGenerator< TListSample, THistogramMeasurement, TFrequencyContainer >::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::ImageRegionSquareTileSplitter< VImageDimension >::GetNumberOfSplits(), otb::NCCRegistrationFunction< TFixedImage, TMovingImage, TDisplacementField >::InitializeIteration(), otb::SEMClassifier< TInputImage, TOutputImage >::InitParameters(), otb::LibSVMMachineLearningModel< TInputValue, TTargetValue >::OptimizeParameters(), otb::ResetMarginFilter< TImage >::OutputRegionToInputRegion(), 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::ResetMarginFilter< TImage >::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::ReflectanceToSurfaceReflectanceImageFilter< TInputImage, TOutputImage >::UpdateAtmosphericRadiativeTerms(), otb::SurfaceReflectanceToReflectanceFilter< TInputImage, TOutputImage >::UpdateAtmosphericRadiativeTerms(), otb::SurfaceAdjacencyEffectCorrectionSchemeFilter< TInputImage, TOutputImage >::UpdateAtmosphericRadiativeTerms(), otb::ReflectanceToSurfaceReflectanceImageFilter< TInputImage, TOutputImage >::UpdateFunctors(), and otb::MapFileProductWriter< TInputImage >::Write().

◆ otbSetObjectMemberMacro

#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(); \
}
static constexpr char const * name() noexcept

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

Definition at line 79 of file otbMacro.h.

Referenced by otb::StreamingStatisticsVectorImageFilter< TInputImage, TPrecision >::GetComponentCorrelationOutput(), otb::SARStreamingDEMCheckFilter< TInputImage >::GetDEMCheck(), otb::SARStreamingDEMClosestHgtFilter< TInputImage >::GetDEMHgt(), otb::SARStreamingCorrelationImageFilter< TInputImage >::GetDoppler(), otb::SARStreamingMaximumMinimumImageFilter< TInputImage >::GetMin(), otb::StreamingShrinkImageFilter< TInputImage, TOutputImage >::GetOutput(), otb::StreamingStatisticsImageFilter< TInputImage >::GetSumOutput(), otb::Wrapper::DirectoryParameter::HasValue(), otb::GenericRSResampleImageFilter< TInputImage, TOutputImage >::SetInterpolator(), otb::StreamingResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType >::SetInterpolator(), otb::GenericRSResampleImageFilter< TInputImage, TOutputImage >::SetOutputOrigin(), otb::StreamingResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType >::SetOutputOrigin(), otb::SARStreamingDEMInformationFilter< TInputImage >::SetSARImageKeyWorList(), otb::SARStreamingMeanPhaseAndAzimutShiftImageFilter< TInputImage >::SetThreshold(), and otb::SARStreamingGridInformationImageFilter< TInputImage >::SetThreshold().

◆ otbTestingCheckNotValidCommand

#define otbTestingCheckNotValidCommand (   command)

Definition at line 152 of file otbMacro.h.

◆ otbTestingCheckValidCommand

#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 123 of file otbMacro.h.

◆ otbUnusedMacro

#define otbUnusedMacro (   x)
Value:
do \
{ \
(void)sizeof(x); \
} while (0)

Definition at line 188 of file otbMacro.h.

Referenced by otb::ImageToSIFTKeyPointSetFilter< TInputImage, TOutputPointSet >::DetectKeyPoint().

◆ otbUseInDebug

#define otbUseInDebug (   name)

Definition at line 201 of file otbMacro.h.

◆ otbUseInRelease

#define otbUseInRelease (   name)    name

Definition at line 202 of file otbMacro.h.

◆ otbWarningMacro

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