Skip to content
Snippets Groups Projects
Commit 0778b4b5 authored by Julien Michel's avatar Julien Michel
Browse files

ENH: Adding virtual methods to handle optimized fit and tie points in SensorModelBase

parent 2454972b
No related branches found
No related tags found
No related merge requests found
...@@ -95,6 +95,15 @@ public: ...@@ -95,6 +95,15 @@ public:
return m_Model->IsValidSensorModel(); 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: protected:
SensorModelBase(); SensorModelBase();
virtual ~SensorModelBase(); virtual ~SensorModelBase();
......
...@@ -86,6 +86,39 @@ SensorModelBase<TScalarType, NInputDimensions, NOutputDimensions> ...@@ -86,6 +86,39 @@ SensorModelBase<TScalarType, NInputDimensions, NOutputDimensions>
m_Model->SetGeoidFile(geoidFile); 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 * PrintSelf method
*/ */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment