Orfeo Toolbox  4.0
Namespaces | Macros
otbMacro.h File Reference
#include "itkMacro.h"
#include "itkObject.h"
#include "otbConfigure.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

namespace  otb
 The "otb" namespace contains all Orfeo Toolbox (OTB) classes There are several nested namespaces withing the otb:: namespace.
 

Macros

#define otbControlConditionTestMacro(condition, message)
 
#define otbDebugMacro(x)   itkDebugMacro(x)
 
#define otbGenericExceptionMacro(T, x)
 
#define otbGenericMsgDebugMacro(x)
 
#define otbGenericMsgTestingMacro(x)
 
#define otbGenericWarningMacro(x)
 
#define otbGetObjectMemberConstMacro(object, name, type)
 
#define otbGetObjectMemberConstReferenceMacro(object, name, type)
 
#define otbGetObjectMemberMacro(object, name, type)
 
#define otbMsgDebugMacro(x)
 
#define otbMsgDevMacro(x)
 
#define otbSetObjectMemberMacro(object, name, type)
 
#define otbTestingCheckNotValidCommand(command)
 
#define otbTestingCheckValidCommand(command)
 
#define otbWarningMacro(x)
 

Macro Definition Documentation

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

#define otbDebugMacro (   x)    itkDebugMacro(x)

This macro is used to print debug (or other information). They are also used to catch errors, etc. Example usage looks like: itkDebugMacro(<< "this is debug info" << this->SomeVariable);

Definition at line 44 of file otbMacro.h.

Referenced by otb::HooverInstanceFilter< TLabelMap >::AfterThreadedGenerateData(), and otb::Wrapper::Application::IsApplicationReady().

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

Definition at line 188 of file otbMacro.h.

#define otbGenericMsgDebugMacro (   x)
Value:
{ \
{ \
std::ostringstream itkmsg; \
itkmsg << " Generic Msg Debug: " x << "\n"; \
::itk::OutputWindowDisplayDebugText(itkmsg.str().c_str()); \
} \
}

Definition at line 65 of file otbMacro.h.

Referenced by otb::ImageToSIFTKeyPointSetFilter< TInputImage, TOutputPointSet >::ComputeDifferenceOfGaussian(), otb::ImageToSIFTKeyPointSetFilter< TInputImage, TOutputPointSet >::DetectKeyPoint(), otb::ParserImpl::ExceptionHandlerDebug(), otb::VectorDataToGISTableFilter< TVectorData, TGISTable >::GenerateData(), otb::ImageToSURFKeyPointSetFilter< TInputImage, TOutputPointSet >::GenerateData(), otb::MDMDNMFImageFilter< TInputImage, TOutputImage >::GenerateData(), otb::ImageToSIFTKeyPointSetFilter< TInputImage, TOutputPointSet >::GenerateData(), otb::DecimateImageFilter< TInputImage, TOutputImage >::GenerateOutputInformation(), otb::PhysicalToRPCSensorModelImageFilter< TImage >::GenerateOutputInformation(), otb::VectorDataToLabelMapFilter< TVectorData, TLabelMap >::GenerateOutputInformation(), otb::VectorDataToLabelMapWithAttributesFilter< TVectorData, TLabelMap >::GenerateOutputInformation(), otb::WaveletFilterBank< TInputImage, TOutputImage, TWaveletOperator, Wavelet::FORWARD >::GenerateOutputInformation(), otb::WaveletFilterBank< TInputImage, TOutputImage, TWaveletOperator, Wavelet::INVERSE >::GenerateOutputInformation(), otb::CumulantsForEdgeworth< TInput >::MakeSumAndMoments(), otb::AtmosphericEffects< TSpectralResponse, TRSR >::Process6S(), otb::VectorDataToLabelMapFilter< TVectorData, TLabelMap >::ProcessNode(), otb::VectorDataToLabelMapWithAttributesFilter< TVectorData, TLabelMap >::ProcessNode(), and otb::TestHelper::RegressionTestImage().

#define otbGenericMsgTestingMacro (   x)
Value:
{ \
std::cout x << std::endl; \
}

Definition at line 78 of file otbMacro.h.

#define otbGenericWarningMacro (   x)
Value:
{ \
{ \
std::ostringstream itkmsg; \
itkmsg << "WARNING: In " __FILE__ ", line " << __LINE__ << ": " x <<"\n";\
itk::OutputWindowDisplayWarningText(itkmsg.str().c_str()); \
} \
}

Definition at line 111 of file otbMacro.h.

Referenced by otb::RPCSolverAdapter::Solve().

#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(); \
}

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 149 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(); \
}

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 160 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(); \
}

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

Definition at line 139 of file otbMacro.h.

#define otbMsgDebugMacro (   x)
Value:
{ \
if (this->GetDebug() && ::itk::Object::GetGlobalWarningDisplay()) \
{ \
std::ostringstream itkmsg; \
itkmsg << " Msg Debug: " x << "\n"; \
::itk::OutputWindowDisplayDebugText(itkmsg.str().c_str()); \
} \
}

Definition at line 53 of file otbMacro.h.

Referenced by otb::VectorDataToImageFilter< TVectorData, TImage >::BeforeThreadedGenerateData(), otb::VectorDataToMapFilter< TVectorData, TImage >::BeforeThreadedGenerateData(), otb::SVMModel< TValue, TLabel >::BuildProblem(), otb::ConfusionMatrixCalculator< TRefListLabel, TProdListLabel >::Compute(), otb::LeastSquareAffineTransformEstimator< TPoint >::Compute(), otb::BayesianFusionFilter< TInputMultiSpectralImage, TInputMultiSpectralInterpImage, TInputPanchroImage, TOutputImage >::ComputeInternalStatistics(), otb::SVMModel< TValue, TLabel >::ConsistencyCheck(), otb::BSplinesInterpolateDisplacementFieldGenerator< TPointSet, TDisplacementField >::GenerateData(), otb::ImageMultiSegmentationToRCC8GraphFilter< TInputImage, TOutputGraph >::GenerateData(), otb::ImageToEdgePathFilter< TInputImage, TOutputPath >::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::VectorDataToImageFilter< TVectorData, TImage >::GenerateData(), otb::VectorDataToMapFilter< TVectorData, TImage >::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::ImageFileReader< TOutputImage, ConvertPixelTraits >::GenerateOutputInformation(), 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::ONERAImageIO::InternalReadImageInformation(), otb::ONERAImageIO::InternalWriteImageInformation(), otb::ONERAImageIO::OpenOneraDataFileForReading(), otb::ONERAImageIO::OpenOneraDataFileForWriting(), otb::ONERAImageIO::OpenOneraHeaderFileForReading(), otb::ONERAImageIO::OpenOneraHeaderFileForWriting(), otb::SVMModelEstimator< InputPixelType, LabelPixelType >::OptimizeParameters(), otb::SEMClassifier< TInputImage, TOutputImage >::PerformStochasticProcess(), otb::SVMSampleListModelEstimator< TInputSampleList, TTrainingSampleList, TMeasurementFunctor >::PrepareData(), otb::PersistentImageToOGRLayerSegmentationFilter< TImageType, TSegmentationFilter >::ProcessTile(), otb::Wrapper::InputProcessXMLParameter::Read(), otb::OGRVectorDataIO::Read(), otb::MSTARImageIO::ReadImageInformation(), otb::RADImageIO::ReadImageInformation(), otb::MWImageIO::ReadImageInformation(), otb::LUMImageIO::ReadImageInformation(), otb::JPEG2000ImageIO::ReadImageInformation(), otb::BSQImageIO::ReadImageInformation(), otb::SEMClassifier< TInputImage, TOutputImage >::SetClassLabels(), otb::SEMClassifier< TInputImage, TOutputImage >::SetNumberOfClasses(), otb::InverseLogPolarTransform< TScalarType >::SetParameters(), otb::LogPolarTransform< TScalarType >::SetParameters(), otb::SOM< TListSample, TMap, TSOMLearningBehaviorFunctor, TSOMNeighborhoodBehaviorFunctor >::Step(), otb::PolygonListToRCC8GraphFilter< TPolygonList, TOutputGraph >::ThreadedGenerateData(), otb::ImageFileWriter< TInputImage >::Update(), otb::RADImageIO::WriteImageInformation(), otb::MWImageIO::WriteImageInformation(), otb::LUMImageIO::WriteImageInformation(), otb::BSQImageIO::WriteImageInformation(), and otb::JPEG2000ImageIO::WriteImageInformation().

#define otbMsgDevMacro (   x)

Definition at line 93 of file otbMacro.h.

Referenced by otb::MarkovRandomFieldFilter< TInputImage, TClassifiedImage >::ApplyMarkovRandomFieldFilter(), otb::PleiadesImageMetadataInterface::BandIndexToWavelengthPosition(), otb::FormosatImageMetadataInterface::BandIndexToWavelengthPosition(), otb::SpotImageMetadataInterface::BandIndexToWavelengthPosition(), otb::PolygonListToRCC8GraphFilter< TPolygonList, TOutputGraph >::BeforeThreadedGenerateData(), otb::VectorDataToImageFilter< TVectorData, TImage >::BeforeThreadedGenerateData(), otb::ImageToLuminanceImageFilter< TInputImage, TOutputImage >::BeforeThreadedGenerateData(), otb::VectorDataToMapFilter< TVectorData, TImage >::BeforeThreadedGenerateData(), otb::Multi3DMapToDEMFilter< T3DImage, TMaskImage, TOutputDEMImage >::BeforeThreadedGenerateData(), otb::LuminanceToReflectanceImageFilter< TInputImage, TOutputImage >::BeforeThreadedGenerateData(), otb::ImageToReflectanceImageFilter< TInputImage, TOutputImage >::BeforeThreadedGenerateData(), otb::StreamingTraits< TImage >::CalculateNeededRadiusForInterpolator(), otb::StreamingTraits< otb::VectorImage< TPixel, VImageDimension > >::CalculateNeededRadiusForInterpolator(), otb::StreamingTraitsBase< TImage >::CalculateNumberOfStreamDivisions(), otb::MSTARImageIO::CanReadFile(), otb::ONERAImageIO::CanReadFile(), otb::LUMImageIO::CanReadFile(), otb::MWImageIO::CanReadFile(), otb::RADImageIO::CanReadFile(), otb::BSQImageIO::CanReadFile(), otb::SIXSTraits::ComputeAtmosphericParameters(), otb::OGRIOHelper::ConvertDataTreeNodeToOGRLayers(), otb::OGRIOHelper::ConvertOGRLayerToDataTreeNode(), otb::Wrapper::ApplicationRegistry::CreateApplication(), otb::SensorModelAdapter::CreateProjection(), otb::PlatformPositionAdapter::CreateSensorModel(), otb::GeometricSarSensorModelAdapter::CreateSensorModel(), otb::DecisionTree< AttributeValueType, LabelType >::Decide(), otb::JPEG2000InternalReader::DecodeTile(), otb::SVMClassifier< TSample, TLabel >::DoClassification(), otb::CoordinateToName::DoEvaluate(), otb::SVMMarginSampler< TSample, TModel >::DoMarginSampling(), error_callback(), otb::ImageToOSMVectorDataGenerator< TImage >::EstimateImageExtent(), otb::StreamingManager< TImage >::EstimateOptimalNumberOfDivisions(), otb::JPEG2000TileCache::EstimateTileCacheSize(), 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::PipelineMemoryPrintCalculator::EvaluateDataObjectPrint(), otb::SVMModel< TValue, TLabel >::EvaluateLabel(), otb::PipelineMemoryPrintCalculator::EvaluateProcessObjectPrintRecursive(), otb::MapProjectionAdapter::ForwardTransform(), otb::ImageMultiSegmentationToRCC8GraphFilter< TInputImage, TOutputGraph >::GenerateData(), otb::LabelToProSailParameters< TLabel >::GenerateData(), otb::ParallelLinePathListFilter< TPath >::GenerateData(), otb::GeometriesToGeometriesFilter::GenerateData(), otb::VectorDataToVectorDataFilter< TInputVectorData, TOutputVectorData >::GenerateData(), otb::RCC8GraphFileWriter< TInputGraph >::GenerateData(), otb::ListSampleToVariableDimensionHistogramGenerator< TListSample, THistogramMeasurement, TFrequencyContainer >::GenerateData(), otb::ImageFileReader< TOutputImage, ConvertPixelTraits >::GenerateData(), otb::VectorDataToGISTableFilter< TVectorData, TGISTable >::GenerateData(), otb::VectorDataExtractROI< TVectorData >::GenerateData(), otb::MorphologicalPyramidAnalysisFilter< TInputImage, TOutputImage, TMorphoFilter >::GenerateData(), otb::VCAImageFilter< TVectorImage >::GenerateData(), otb::MorphologicalPyramidSynthesisFilter< TInputImage, TOutputImage >::GenerateData(), otb::MorphologicalPyramidSegmentationFilter< TInputImage, TOutputImage >::GenerateData(), otb::StreamingImageVirtualWriter< TInputImage >::GenerateData(), otb::ListSampleToHistogramListGenerator< TListSample, THistogramMeasurement, TFrequencyContainer >::GenerateData(), otb::MorphologicalPyramid::MRToMSConverter< TInputImage, TOutputImage >::GenerateData(), otb::VectorDataToImageFilter< TVectorData, TImage >::GenerateData(), otb::WaveletTransform< TInputImage, TOutputImage, TFilter, Wavelet::FORWARD >::GenerateData(), otb::VectorDataProjectionFilter< TInputVectorData, TOutputVectorData >::GenerateData(), otb::DisparityMapEstimationMethod< TFixedImage, TMovingImage, TPointSet >::GenerateData(), otb::VectorDataToMapFilter< TVectorData, TImage >::GenerateData(), otb::WaveletTransform< TInputImage, TOutputImage, TFilter, Wavelet::INVERSE >::GenerateData(), otb::WaveletPacketTransform< TInputImage, TOutputImage, TFilter, Wavelet::INVERSE, FullyDecomposedWaveletPacketCost< TInputImage > >::GenerateData(), otb::ExtractROIBase< TInputImage, TOutputImage >::GenerateInputRequestedRegion(), otb::LineDetectorImageFilterBase< TInputImage, TOutputImage, TOutputImageDirection, TInterpolator >::GenerateInputRequestedRegion(), otb::ConvolutionImageFilter< TInputImage, TOutputImage, TBoundaryCondition, TFilterPrecision >::GenerateInputRequestedRegion(), otb::ImageFileReader< TOutputImage, ConvertPixelTraits >::GenerateOutputInformation(), otb::VectorDataToLabelImageFilter< TVectorData, TOutputImage >::GenerateOutputInformation(), otb::RasterizeVectorDataFilter< TVectorData, TInputImage, TOutputImage >::GenerateOutputInformation(), otb::WaveletPacketTransform< TInputImage, TOutputImage, TFilter, Wavelet::INVERSE, FullyDecomposedWaveletPacketCost< TInputImage > >::GenerateOutputInformation(), otb::StreamingManager< TImage >::GetActualAvailableRAMInBytes(), otb::Wrapper::ApplicationRegistry::GetAvailableApplications(), otb::ConfigurationFile::GetAvailableRAMInBytes(), otb::ConfigurationFile::GetDEMDirectory(), otb::SVMCrossValidationCostFunction< TModel >::GetDerivative(), otb::ImageFileReader< TOutputImage, ConvertPixelTraits >::GetGdalReadImageFileName(), otb::ConfigurationFile::GetGeoidFile(), otb::MultiChannelRadiometricImageFilter< TInputImage, TOutputImage, TFunction >::GetIndex(), otb::StreamingShrinkImageRegionSplitter::GetNumberOfSplits(), otb::ImageRegionSquareTileSplitter< VImageDimension >::GetNumberOfSplits(), otb::JPEG2000MetadataReader::GetOriginFromGMLBox(), otb::PleiadesImageMetadataInterface::GetPhysicalGain(), otb::GDALImageIO::GetSubDatasetInfo(), otb::JPEG2000TileCache::GetTile(), info_callback(), otb::JPEG2000InternalReader::Initialize(), otb::NCCRegistrationFunction< TFixedImage, TMovingImage, TDisplacementField >::InitializeIteration(), otb::SEMClassifier< TInputImage, TOutputImage >::InitParameters(), otb::MapProjectionAdapter::InstanciateProjection(), otb::GenericRSTransform< TScalarType, NInputDimensions, NOutputDimensions >::InstanciateTransform(), otb::GDALImageIO::InternalReadImageInformation(), otb::TileMapImageIO::InternalWrite(), otb::GDALImageIO::InternalWriteImageInformation(), otb::MapProjectionAdapter::InverseTransform(), otb::CurlHelper::IsCurlReturnHttpError(), otb::ConfigurationFile::LoadSilent(), otb::DEMHandler::OpenDEMDirectory(), otb::DEMHandler::OpenGeoidFile(), otb::SVMModelEstimator< InputPixelType, LabelPixelType >::OptimizeParameters(), otb::RCC8GraphFileReader< TOutputGraph >::ParseEdge(), otb::RCC8GraphFileReader< TOutputGraph >::ParseVertex(), otb::CoordinateToName::ParseXMLGeonames(), otb::LibSVMMachineLearningModel< TInputValue, TTargetValue >::Predict(), otb::SVMPointSetModelEstimator< TInputPointSet, TTrainingPointSet >::PrepareData(), otb::NumberOfDivisionsTiledStreamingManager< TImage >::PrepareStreaming(), otb::NumberOfDivisionsStrippedStreamingManager< TImage >::PrepareStreaming(), otb::NumberOfLinesStrippedStreamingManager< TImage >::PrepareStreaming(), otb::RAMDrivenTiledStreamingManager< TImage >::PrepareStreaming(), otb::RAMDrivenAdaptativeStreamingManager< TImage >::PrepareStreaming(), otb::StreamingShrinkStreamingManager< TInputImage >::PrepareStreaming(), otb::VectorDataToLabelMapFilter< TVectorData, TLabelMap >::ProcessNode(), otb::OGRIOHelper::ProcessNodeWrite(), otb::VectorDataExtractROI< TVectorData >::ProjectRegionToInputVectorProjection(), otb::Wrapper::InputProcessXMLParameter::Read(), otb::MSTARImageIO::Read(), otb::ONERAImageIO::Read(), otb::LUMImageIO::Read(), otb::MWImageIO::Read(), otb::RADImageIO::Read(), otb::BSQImageIO::Read(), otb::JPEG2000ImageIO::Read(), otb::OGRVectorDataIO::Read(), otb::KMLVectorDataIO::Read(), otb::TileMapImageIO::Read(), otb::GDALImageIO::Read(), otb::ReadGeometryFromImage(), otb::JPEG2000ImageIO::ReadImageInformation(), otb::TileMapImageIO::ReadImageInformation(), otb::TileMapImageIO::ReadTile(), otb::CurlHelper::RetrieveFile(), otb::CurlHelper::RetrieveFileMulti(), otb::CurlHelper::RetrieveUrlInMemory(), otb::MultiChannelRadiometricImageFilter< TInputImage, TOutputImage, TFunction >::SetIndex(), otb::CurlHelper::TestUrlAvailability(), otb::PolygonListToRCC8GraphFilter< TPolygonList, TOutputGraph >::ThreadedGenerateData(), otb::LineDetectorImageFilterBase< TInputImage, TOutputImage, TOutputImageDirection, TInterpolator >::ThreadedGenerateData(), otb::Multi3DMapToDEMFilter< T3DImage, TMaskImage, TOutputDEMImage >::ThreadedGenerateData(), otb::JPEG2000ImageIO::ThreaderCallback(), otb::ImageFileWriter< TInputImage >::Update(), otb::ReflectanceToSurfaceReflectanceImageFilter< TInputImage, TOutputImage >::UpdateAtmosphericRadiativeTerms(), otb::ReflectanceToSurfaceReflectanceImageFilter< TInputImage, TOutputImage >::UpdateFunctors(), otb::ParallelLinePathListFilter< TPath >::VerifyCommonDistanceCondition(), warning_callback(), otb::ONERAImageIO::Write(), otb::MWImageIO::Write(), otb::RADImageIO::Write(), otb::LUMImageIO::Write(), otb::BSQImageIO::Write(), otb::OGRVectorDataIO::Write(), otb::KMLVectorDataIO::Write(), otb::TileMapImageIO::Write(), otb::GDALImageIO::Write(), otb::MapFileProductWriter< TInputImage >::Write(), otb::RCC8GraphFileWriter< TInputGraph >::WriteEdge(), otb::WriteGeometry(), and otb::RCC8GraphFileWriter< TInputGraph >::WriteVertex().

#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 130 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 Unknow error while running " << # command << " (catch(...) )"; \
::itk::ExceptionObject e_(__FILE__, __LINE__, message.str().c_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().c_str(), ITK_LOCATION); \
throw e_; \
} \
}

Definition at line 196 of file otbMacro.h.

#define otbTestingCheckValidCommand (   command)
Value:
{ \
try \
{ \
command; \
} \
catch (const std::exception&) { \
throw; } \
catch (...) \
{ \
std::ostringstream message; \
message << "otb::ERROR Unknow error while running " << # command << " (catch(...) )"; \
::itk::ExceptionObject e_(__FILE__, __LINE__, message.str().c_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 170 of file otbMacro.h.

#define otbWarningMacro (   x)
Value:
{ \
{ \
std::ostringstream itkmsg; \
itkmsg << "WARNING: In " __FILE__ ", line " << __LINE__ << "\n" \
<< this->GetNameOfClass() << " (" << this << "): " x \
<< "\n\n"; \
itk::OutputWindowDisplayWarningText(itkmsg.str().c_str()); \
} \
}

This macro is used to print warning information (i.e., unusual circumstance but not necessarily fatal.) Example usage looks like: itkWarningMacro(<< "this is warning info" << this->SomeVariable);

Definition at line 99 of file otbMacro.h.

Referenced by otb::BandMathImageFilter< TImage >::AfterThreadedGenerateData(), otb::HooverInstanceFilter< TLabelMap >::BeforeThreadedGenerateData(), otb::OGRIOHelper::ConvertOGRLayerToDataTreeNode(), otb::OGRLayerStreamStitchingFilter< TInputImage >::ProcessStreamingLine(), otb::JPEG2000ImageIO::ReadImageInformation(), otb::LabelMapToAttributeImageFilter< TInputImage, TOutputImage, TAttributeAccessor >::SetAttributeForNthChannel(), otb::HooverInstanceFilter< TLabelMap >::ThreadedProcessLabelObject(), and otb::ImageFileWriter< TInputImage >::Update().


Generated at Sat Mar 8 2014 16:29:05 for Orfeo Toolbox with doxygen 1.8.3.1