diff --git a/Code/Projections/otbSensorModelBase.h b/Code/Projections/otbSensorModelBase.h index b7c5074f7777d23a762c71968e70356673c4902a..6cbf9d472a6407f42941072c2dd9e876daa2c89c 100644 --- a/Code/Projections/otbSensorModelBase.h +++ b/Code/Projections/otbSensorModelBase.h @@ -95,6 +95,15 @@ public: return m_Model->IsValidSensorModel(); } + /** Add a tie point to optimize sensor model */ + virtual void AddTiePoint(const InputPointType & inputPoint, const OutputPointType & outputPoint); + + /** Clear tie points */ + void ClearTiePoints(); + + /** Optimize sensor model */ + double Optimize(); + protected: SensorModelBase(); virtual ~SensorModelBase(); diff --git a/Code/Projections/otbSensorModelBase.txx b/Code/Projections/otbSensorModelBase.txx index df81a73e47ae1e4aa992982e4825a073a4467a60..02153a39b4c20e8654499c97f7d92bb5eccea9de 100644 --- a/Code/Projections/otbSensorModelBase.txx +++ b/Code/Projections/otbSensorModelBase.txx @@ -86,6 +86,39 @@ SensorModelBase<TScalarType, NInputDimensions, NOutputDimensions> m_Model->SetGeoidFile(geoidFile); } + +template <class TScalarType, + unsigned int NInputDimensions, + unsigned int NOutputDimensions> +void +SensorModelBase<TScalarType, NInputDimensions, NOutputDimensions> +::AddTiePoint(const InputPointType & inputPoint, const OutputPointType & outputPoint) +{ + itkExceptionMacro(<<"Method should be re-implemented in sub-classes (forward and inverse models)"); +} + +/** Clear tie points */ +template <class TScalarType, + unsigned int NInputDimensions, + unsigned int NOutputDimensions> +void +SensorModelBase<TScalarType, NInputDimensions, NOutputDimensions> +::ClearTiePoints() +{ + m_Model->ClearTiePoints(); +} + +/** Optimize sensor model */ +template <class TScalarType, + unsigned int NInputDimensions, + unsigned int NOutputDimensions> +double +SensorModelBase<TScalarType, NInputDimensions, NOutputDimensions> +::Optimize() +{ + return m_Model->Optimize(); +} + /** * PrintSelf method */