/usr/include/OTB-5.8/otbDisparityMapEstimationMethod.h is in libotb-dev 5.8.0+dfsg-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 | /*=========================================================================
Program: ORFEO Toolbox
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
See OTBCopyright.txt for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#ifndef otbDisparityMapEstimationMethod_h
#define otbDisparityMapEstimationMethod_h
#include "itkImageToImageMetric.h"
#include "itkSingleValuedNonLinearOptimizer.h"
#include "itkDataObjectDecorator.h"
#include "itkPointSet.h"
#include "otbPointSetSource.h"
namespace otb
{
/** \class DisparityMapEstimationMethod
* \brief This class performs an estimation of the local displacement
* modelled by a given transform between the fixed and the moving image,
* at each point of the given point set.
*
* It uses the ITK registration framework locally for each point and thus
* provides the flexibility of this framework. The parameters of each transform
* are stored in the output point set associated data. Optimizer, metric,
* interpolator and transform fixed parameters have to be set by the user.
*
* This filters returns the pointset enriched with a set of value as PointData, in order of apparition :
* - The final metric value,
* - The column displacement value,
* - The row displacement value,
* - The final estimated parameters of the transform.
*
* This class is derived from the MAECENAS code provided by Jordi Inglada,
* from CNES.
*
* \sa FineRegistrationImageFilter, FastCorrelationImageFilter
*
* \ingroup OTBDisparityMap
*/
template <class TFixedImage, class TMovingImage, class TPointSet>
class ITK_EXPORT DisparityMapEstimationMethod
: public PointSetSource<TPointSet>
{
public:
/** Standard class typedefs. */
typedef DisparityMapEstimationMethod Self;
typedef PointSetSource<TPointSet> Superclass;
typedef itk::SmartPointer<Self> Pointer;
typedef itk::SmartPointer<const Self> ConstPointer;
/** Method for creation through the object factory. */
itkNewMacro(Self);
/** Run-time type information (and related methods). */
itkTypeMacro(DisparityMapEstimationMethod, ProcessObject);
/** Typedef for the Fixed image. */
typedef TFixedImage FixedImageType;
typedef typename FixedImageType::Pointer FixedImagePointerType;
typedef typename FixedImageType::PixelType FixedPixelType;
typedef typename FixedImageType::SizeType SizeType;
/** Typedef for the Moving image. */
typedef TMovingImage MovingImageType;
typedef typename MovingImageType::Pointer MovingImagePointerType;
typedef typename MovingImageType::PixelType MovingPixelType;
/** Typedef for the input and output point set */
typedef TPointSet PointSetType;
typedef typename PointSetType::Pointer PointSetPointerType;
/** Typedef for the generic metric. */
typedef itk::ImageToImageMetric<FixedImageType, MovingImageType> MetricType;
typedef typename MetricType::Pointer MetricPointerType;
typedef typename MetricType::FixedImageRegionType FixedImageRegionType;
/** Typedef for the generic transform . */
typedef typename MetricType::TransformType TransformType;
typedef typename TransformType::Pointer TransformPointerType;
/** Using Decorator pattern for enabling the Transform to be passed in the data pipeline */
typedef itk::DataObjectDecorator<TransformType> TransformOutputType;
typedef typename TransformOutputType::Pointer TransformOutputPointerType;
typedef typename TransformOutputType::ConstPointer TransformOutputConstPointerType;
/** Typedef for the generic interpolator. */
typedef typename MetricType::InterpolatorType InterpolatorType;
typedef typename InterpolatorType::Pointer InterpolatorPointerType;
/** Typedef for the generic optimizer. */
typedef itk::SingleValuedNonLinearOptimizer OptimizerType;
typedef typename OptimizerType::Pointer OptimizerPointerType;
/** Type of the Transformation parameters This is the same type used to
* represent the search space of the optimization algorithm */
typedef typename MetricType::TransformParametersType ParametersType;
/** Smart Pointer type to a DataObject. */
typedef typename itk::DataObject::Pointer DataObjectPointer;
/** Set/Get the Optimizer. */
itkSetObjectMacro(Optimizer, OptimizerType);
itkGetObjectMacro(Optimizer, OptimizerType);
/** Set/Get the Metric. */
itkSetObjectMacro(Metric, MetricType);
itkGetObjectMacro(Metric, MetricType);
/** Set/Get the Transform. */
itkSetObjectMacro(Transform, TransformType);
itkGetObjectMacro(Transform, TransformType);
/** Set/Get the Interpolator. */
itkSetObjectMacro(Interpolator, InterpolatorType);
itkGetObjectMacro(Interpolator, InterpolatorType);
/** Set/Get the window radius */
itkSetMacro(WinSize, SizeType);
itkGetMacro(WinSize, SizeType);
/** Set/Get the exploration area radius */
itkSetMacro(ExploSize, SizeType);
itkGetMacro(ExploSize, SizeType);
/** Set/Get the initial transformation parameters. */
itkSetMacro(InitialTransformParameters, ParametersType);
itkGetConstReferenceMacro(InitialTransformParameters, ParametersType);
/**
* Set the source pointset.
* \param pointset The source pointset.
*/
void SetPointSet(const TPointSet * pointset);
/**
* Get the source pointset.
* \return The source pointset.
*/
const TPointSet * GetPointSet(void);
/**
* Set the fixed image.
* \param image The fixed image.
**/
void SetFixedImage(const TFixedImage * image);
/**
* Get the fixed image.
* \return The fixed image.
**/
const TFixedImage * GetFixedImage(void);
/**
* Set the moving image.
* \param image The mobing image.
**/
void SetMovingImage(const TMovingImage * image);
/**
* Get the fixed image.
* \return The fixed image.
**/
const TMovingImage * GetMovingImage(void);
protected:
/**
* Constructor.
*/
DisparityMapEstimationMethod();
/**
* Destructor.
*/
~DisparityMapEstimationMethod() ITK_OVERRIDE;
/**
* Standard PrintSelf method.
*/
void PrintSelf(std::ostream& os, itk::Indent indent) const ITK_OVERRIDE;
/**
* Main computation method.
*/
void GenerateData() ITK_OVERRIDE;
private:
DisparityMapEstimationMethod(const Self &); //purposely not implemented
void operator =(const Self&); //purposely not implemented
/**
* The metric used for local registration.
*/
MetricPointerType m_Metric;
/**
* The optimizer used for local registration.
*/
OptimizerPointerType m_Optimizer;
/**
* The transform used for local registration.
*/
TransformPointerType m_Transform;
/**
* The interpolator used for local registration.
*/
InterpolatorPointerType m_Interpolator;
/**
* The initial transform parameters.
*/
ParametersType m_InitialTransformParameters;
/**
* The size of the exploration area
*/
SizeType m_ExploSize;
/**
* The size of the window
*/
SizeType m_WinSize;
};
} // end namespace otb
#ifndef OTB_MANUAL_INSTANTIATION
#include "otbDisparityMapEstimationMethod.txx"
#endif
#endif
|