/usr/include/OTB-5.8/otbLineOfSightOptimizer.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 | /*=========================================================================
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 otbLineOfSightOptimizer_h
#define otbLineOfSightOptimizer_h
#include "itkObject.h"
#include "itkPointSet.h"
namespace otb
{
/** \class LineOfSightOptimizer
* \brief Compute the position of a 3D point from a set of N lines of sight
*
* This filter can use at least 2 lines of sight to estimate the position of
* the intersection using a Mean Square optimization method.
* This filter is templated over the precision of 3 points coordinates
*
*
* \ingroup OTBStereo
*/
template <class TPrecision = float, class TLabel = int>
class ITK_EXPORT LineOfSightOptimizer :
public itk::Object
{
public:
/** Standard class typedef */
typedef LineOfSightOptimizer Self;
typedef itk::Object 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(LineOfSightOptimizer, itk::Object);
/** Useful typedefs */
typedef TPrecision PrecisionType;
typedef TLabel LabelType;
typedef itk::DefaultStaticMeshTraits<TLabel,3,3,TPrecision> MeshType;
typedef itk::PointSet<TLabel,3, MeshType > PointSetType;
typedef typename PointSetType::PointType PointType;
typedef typename PointSetType::Pointer PointSetPointerType;
typedef typename PointSetType::PointsContainerConstIterator PointSetConstIteratorType;
typedef typename PointSetType::PointDataContainerIterator LabelIteratorType;
typedef std::vector<TPrecision> ResidueType;
/** Compute the best intersection between N lines of sight.
* Starting points of every line of sight are stored in the point set 'pointA'
* ending points are stored in 'pointB' (however, the computation is symmetrical)*/
PointType Compute(PointSetPointerType pointA, PointSetPointerType pointB);
/** Get the residues from last computation */
//itkGetMacro(Residues,ResidueType);
ResidueType GetResidues()
{
return m_Residues;
}
/** Get the global residue from last computation */
itkGetMacro(GlobalResidue,PrecisionType);
protected:
/** Constructor */
LineOfSightOptimizer();
/** Destructor */
~LineOfSightOptimizer() ITK_OVERRIDE{};
private:
LineOfSightOptimizer(const Self&); //purposely not implemented
void operator=(const Self&); //purposely not implemented
/** residues from the last computation on each line of sight */
ResidueType m_Residues;
/** global residu from last computation */
PrecisionType m_GlobalResidue;
/** Internal matrices for computation */
vnl_matrix<PrecisionType> m_InvCumul;
vnl_matrix<PrecisionType> m_Identity;
vnl_vector<PrecisionType> m_SecCumul;
};
} // end namespace otb
#ifndef OTB_MANUAL_INSTANTIATION
#include "otbLineOfSightOptimizer.txx"
#endif
#endif
|