OTB  9.0.0
Orfeo Toolbox
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
otb::GCPsToRPCSensorModelImageFilter< TImage > Class Template Reference

#include <otbGCPsToRPCSensorModelImageFilter.h>

+ Inheritance diagram for otb::GCPsToRPCSensorModelImageFilter< TImage >:
+ Collaboration diagram for otb::GCPsToRPCSensorModelImageFilter< TImage >:

Public Types

typedef itk::SmartPointer< const SelfConstPointer
 
typedef itk::ContinuousIndex< double, 3 > Continuous3DIndexType
 
typedef itk::ContinuousIndex ContinuousIndexType
 
typedef otb::DEMHandler DEMHandlerType
 
typedef std::vector< double > ErrorsContainerType
 
typedef std::vector< GCPTypeGCPsContainerType
 
typedef std::pair< Point2DType, Point3DTypeGCPType
 
typedef itk::Point< double, 2 > Point2DType
 
typedef itk::Point< double, 3 > Point3DType
 
typedef itk::SmartPointer< SelfPointer
 
typedef GCPsToRPCSensorModelImageFilter Self
 
typedef itk::CastImageFilter< TImage, TImage > Superclass
 

Public Member Functions

virtual ::itk::LightObject::Pointer CreateAnother (void) const
 
virtual const char * GetNameOfClass () const
 

Static Public Member Functions

static Pointer New ()
 

Static Public Attributes

static const unsigned int ImageDimension = TImage::ImageDimension
 
bool m_UseImageGCPs
 
double m_RMSGroundError
 
ErrorsContainerType m_ErrorsContainer
 
double m_MeanError
 
bool m_UseDEM
 
double m_MeanElevation
 
GCPsContainerType m_GCPsContainer
 
ImageMetadata m_ImageMetadata
 
bool m_ModelUpToDate
 
void SetUseImageGCPs (bool use)
 
void LoadImageGCPs ()
 
virtual void SetUseDEM (bool _arg)
 
virtual bool GetUseDEM ()
 
virtual void UseDEMOn ()
 
virtual void UseDEMOff ()
 
virtual void SetMeanElevation (double _arg)
 
virtual const double & GetMeanElevation () const
 
virtual const double & GetRMSGroundError () const
 
ErrorsContainerTypeGetErrorsContainer ()
 
virtual const double & GetMeanError () const
 
GCPsContainerTypeGetGCPsContainer ()
 
void SetGCPsContainer (const GCPsContainerType &container)
 
void AddGCP (const Point2DType &sensorPoint, const Point3DType &groundPoint)
 
void AddGCP (const Point2DType &sensorPoint, const Point2DType &groundPoint)
 
void RemoveGCP (unsigned int id)
 
void ClearGCPs ()
 
 GCPsToRPCSensorModelImageFilter ()
 
 ~GCPsToRPCSensorModelImageFilter () override
 
void PrintSelf (std::ostream &os, itk::Indent indent) const override
 
void GenerateOutputInformation () override
 
void Modified () const override
 
 GCPsToRPCSensorModelImageFilter (const Self &)=delete
 
void operator= (const Self &)=delete
 
void ComputeErrors ()
 

Detailed Description

template<class TImage>
class otb::GCPsToRPCSensorModelImageFilter< TImage >

This filter estimates a RPC sensor models from GCPs.

This filters estimates an RPC sensor model from a list of user defined GCPs. Internally, it uses an RpcSolver, which performs the estimation using the well known least-square method.

The UseImageGCPs flag allows importing GCPs from the image metadata, if any.

GCPs can be passed to the filter using one of the AddGCP method implementation.

The first implementation takes geographic points with elevation (3D points).

The second implementation accepts geographic points without the elevation information. In this case, either the mean elevation or an elevation fetch from a SRT directory is used, depending on the value of the UseDEM flag.

If UseDEM is set to true, the DEMHandler is used to retrieve the elevation information. The user can either set its own DEMHandler using the appropriate setter, or configure the existing internal DEMHandler using the Getter.

The RMS (root mean square) ground error is available through the appropriate getter.

Please note that GCPs are inferred to be given in physical coordinates. This is seamless in most cases.

Please note that at least 16 GCPs are required to estimate a proper RPC sensor model, although no warning will be reported to the user if the number of GCPs is lower than 16.

This filter does not modify the image buffer, but only the metadata. Therefore, it provides in-place support, which is enabled by default. Call InPlaceOff() to change the default behavior.

The output image can be given to the OrthorectificationFilter.

Definition at line 78 of file otbGCPsToRPCSensorModelImageFilter.h.

Member Typedef Documentation

◆ ConstPointer

template<class TImage >
typedef itk::SmartPointer<const Self> otb::GCPsToRPCSensorModelImageFilter< TImage >::ConstPointer

Definition at line 85 of file otbGCPsToRPCSensorModelImageFilter.h.

◆ Continuous3DIndexType

template<class TImage >
typedef itk::ContinuousIndex<double, 3> otb::GCPsToRPCSensorModelImageFilter< TImage >::Continuous3DIndexType

Definition at line 95 of file otbGCPsToRPCSensorModelImageFilter.h.

◆ ContinuousIndexType

template<class TImage >
typedef itk::ContinuousIndex otb::GCPsToRPCSensorModelImageFilter< TImage >::ContinuousIndexType

Definition at line 94 of file otbGCPsToRPCSensorModelImageFilter.h.

◆ DEMHandlerType

template<class TImage >
typedef otb::DEMHandler otb::GCPsToRPCSensorModelImageFilter< TImage >::DEMHandlerType

DEM typedef

Definition at line 98 of file otbGCPsToRPCSensorModelImageFilter.h.

◆ ErrorsContainerType

template<class TImage >
typedef std::vector<double> otb::GCPsToRPCSensorModelImageFilter< TImage >::ErrorsContainerType

Definition at line 92 of file otbGCPsToRPCSensorModelImageFilter.h.

◆ GCPsContainerType

template<class TImage >
typedef std::vector<GCPType> otb::GCPsToRPCSensorModelImageFilter< TImage >::GCPsContainerType

Definition at line 91 of file otbGCPsToRPCSensorModelImageFilter.h.

◆ GCPType

template<class TImage >
typedef std::pair<Point2DType, Point3DType> otb::GCPsToRPCSensorModelImageFilter< TImage >::GCPType

Definition at line 90 of file otbGCPsToRPCSensorModelImageFilter.h.

◆ Point2DType

template<class TImage >
typedef itk::Point<double, 2> otb::GCPsToRPCSensorModelImageFilter< TImage >::Point2DType

GCPs typedefs

Definition at line 88 of file otbGCPsToRPCSensorModelImageFilter.h.

◆ Point3DType

template<class TImage >
typedef itk::Point<double, 3> otb::GCPsToRPCSensorModelImageFilter< TImage >::Point3DType

Definition at line 89 of file otbGCPsToRPCSensorModelImageFilter.h.

◆ Pointer

template<class TImage >
typedef itk::SmartPointer<Self> otb::GCPsToRPCSensorModelImageFilter< TImage >::Pointer

Definition at line 84 of file otbGCPsToRPCSensorModelImageFilter.h.

◆ Self

Standard class typedefs.

Definition at line 82 of file otbGCPsToRPCSensorModelImageFilter.h.

◆ Superclass

template<class TImage >
typedef itk::CastImageFilter<TImage, TImage> otb::GCPsToRPCSensorModelImageFilter< TImage >::Superclass

Definition at line 83 of file otbGCPsToRPCSensorModelImageFilter.h.

Constructor & Destructor Documentation

◆ GCPsToRPCSensorModelImageFilter() [1/2]

template<class TImage >
otb::GCPsToRPCSensorModelImageFilter< TImage >::GCPsToRPCSensorModelImageFilter
protected

◆ ~GCPsToRPCSensorModelImageFilter()

template<class TImage >
otb::GCPsToRPCSensorModelImageFilter< TImage >::~GCPsToRPCSensorModelImageFilter
overrideprotected

Destructor

Definition at line 56 of file otbGCPsToRPCSensorModelImageFilter.hxx.

◆ GCPsToRPCSensorModelImageFilter() [2/2]

template<class TImage >
otb::GCPsToRPCSensorModelImageFilter< TImage >::GCPsToRPCSensorModelImageFilter ( const Self )
privatedelete

True to use GCPs from image metadata as well

Member Function Documentation

◆ AddGCP() [1/2]

template<class TImage >
void otb::GCPsToRPCSensorModelImageFilter< TImage >::AddGCP ( const Point2DType sensorPoint,
const Point2DType groundPoint 
)

Add A GCP to the GCPContainer. This version of the AddGCP method accepts a 3D ground point and use the DEM or MeanElevation to get the corresponding elevation before calling the AddGCP acception 3D ground points.

Definition at line 109 of file otbGCPsToRPCSensorModelImageFilter.hxx.

References otb::DEMHandler::GetHeightAboveEllipsoid(), and otb::DEMHandler::GetInstance().

◆ AddGCP() [2/2]

template<class TImage >
void otb::GCPsToRPCSensorModelImageFilter< TImage >::AddGCP ( const Point2DType sensorPoint,
const Point3DType groundPoint 
)

Add a GCP to the GCPContainer. This version of the AddGCP method accepts a 3D ground point and does not use DEM or MeanElevation to handle the elevation

Definition at line 98 of file otbGCPsToRPCSensorModelImageFilter.hxx.

◆ ClearGCPs()

template<class TImage >
void otb::GCPsToRPCSensorModelImageFilter< TImage >::ClearGCPs

◆ ComputeErrors()

template<class TImage >
void otb::GCPsToRPCSensorModelImageFilter< TImage >::ComputeErrors
private

Transform all GCPs and compute the error and mean error

Definition at line 217 of file otbGCPsToRPCSensorModelImageFilter.hxx.

◆ CreateAnother()

template<class TImage >
virtual::itk::LightObject::Pointer otb::GCPsToRPCSensorModelImageFilter< TImage >::CreateAnother ( void  ) const

◆ GenerateOutputInformation()

template<class TImage >
void otb::GCPsToRPCSensorModelImageFilter< TImage >::GenerateOutputInformation
overrideprotected

Actual estimation of the sensor model takes place in the GenerateOutputInformation() method

Definition at line 263 of file otbGCPsToRPCSensorModelImageFilter.hxx.

References otb::RPC, and otb::RPCSolver::Solve().

◆ GetErrorsContainer()

template<class TImage >
GCPsToRPCSensorModelImageFilter< TImage >::ErrorsContainerType & otb::GCPsToRPCSensorModelImageFilter< TImage >::GetErrorsContainer

Get the Error container

Definition at line 82 of file otbGCPsToRPCSensorModelImageFilter.hxx.

◆ GetGCPsContainer()

template<class TImage >
GCPsToRPCSensorModelImageFilter< TImage >::GCPsContainerType & otb::GCPsToRPCSensorModelImageFilter< TImage >::GetGCPsContainer

Get the GCPsContainer

Returns
The GCPs container

Definition at line 75 of file otbGCPsToRPCSensorModelImageFilter.hxx.

◆ GetMeanElevation()

template<class TImage >
virtual const double& otb::GCPsToRPCSensorModelImageFilter< TImage >::GetMeanElevation ( ) const
virtual

True to use GCPs from image metadata as well

◆ GetMeanError()

template<class TImage >
virtual const double& otb::GCPsToRPCSensorModelImageFilter< TImage >::GetMeanError ( ) const
virtual

Get the mean error

◆ GetNameOfClass()

template<class TImage >
virtual const char* otb::GCPsToRPCSensorModelImageFilter< TImage >::GetNameOfClass ( ) const
virtual

Run-time type information (and related methods).

◆ GetRMSGroundError()

template<class TImage >
virtual const double& otb::GCPsToRPCSensorModelImageFilter< TImage >::GetRMSGroundError ( ) const
virtual

Get the residual ground error

◆ GetUseDEM()

template<class TImage >
virtual bool otb::GCPsToRPCSensorModelImageFilter< TImage >::GetUseDEM ( )
virtual

True to use GCPs from image metadata as well

◆ LoadImageGCPs()

template<class TImage >
void otb::GCPsToRPCSensorModelImageFilter< TImage >::LoadImageGCPs

True to use GCPs from image metadata as well

Definition at line 165 of file otbGCPsToRPCSensorModelImageFilter.hxx.

◆ Modified()

template<class TImage >
void otb::GCPsToRPCSensorModelImageFilter< TImage >::Modified
overrideprotected

Drive the model up-to-date flag

Definition at line 64 of file otbGCPsToRPCSensorModelImageFilter.hxx.

◆ New()

template<class TImage >
static Pointer otb::GCPsToRPCSensorModelImageFilter< TImage >::New ( )
static

Method for creation through the object factory.

◆ operator=()

template<class TImage >
void otb::GCPsToRPCSensorModelImageFilter< TImage >::operator= ( const Self )
privatedelete

True to use GCPs from image metadata as well

◆ PrintSelf()

template<class TImage >
void otb::GCPsToRPCSensorModelImageFilter< TImage >::PrintSelf ( std::ostream &  os,
itk::Indent  indent 
) const
overrideprotected

The PrintSelf method

Definition at line 294 of file otbGCPsToRPCSensorModelImageFilter.hxx.

◆ RemoveGCP()

template<class TImage >
void otb::GCPsToRPCSensorModelImageFilter< TImage >::RemoveGCP ( unsigned int  id)

Remove a GCP given by it's coordinates

Definition at line 138 of file otbGCPsToRPCSensorModelImageFilter.hxx.

◆ SetGCPsContainer()

template<class TImage >
void otb::GCPsToRPCSensorModelImageFilter< TImage >::SetGCPsContainer ( const GCPsContainerType container)

Set the GCP container

Definition at line 89 of file otbGCPsToRPCSensorModelImageFilter.hxx.

◆ SetMeanElevation()

template<class TImage >
virtual void otb::GCPsToRPCSensorModelImageFilter< TImage >::SetMeanElevation ( double  _arg)
virtual

Set/Get the mean elevation

◆ SetUseDEM()

template<class TImage >
virtual void otb::GCPsToRPCSensorModelImageFilter< TImage >::SetUseDEM ( bool  _arg)
virtual

Set/Get/toggle the UseDEM flag

◆ SetUseImageGCPs()

template<class TImage >
void otb::GCPsToRPCSensorModelImageFilter< TImage >::SetUseImageGCPs ( bool  use)

Set/Get/toggle the UseImageGCPs flag

Definition at line 156 of file otbGCPsToRPCSensorModelImageFilter.hxx.

◆ UseDEMOff()

template<class TImage >
virtual void otb::GCPsToRPCSensorModelImageFilter< TImage >::UseDEMOff ( )
virtual

True to use GCPs from image metadata as well

◆ UseDEMOn()

template<class TImage >
virtual void otb::GCPsToRPCSensorModelImageFilter< TImage >::UseDEMOn ( )
virtual

True to use GCPs from image metadata as well

Member Data Documentation

◆ ImageDimension

template<class TImage >
const unsigned int otb::GCPsToRPCSensorModelImageFilter< TImage >::ImageDimension = TImage::ImageDimension
static

Extract dimension from input and output image.

Definition at line 107 of file otbGCPsToRPCSensorModelImageFilter.h.

◆ m_ErrorsContainer

template<class TImage >
ErrorsContainerType otb::GCPsToRPCSensorModelImageFilter< TImage >::m_ErrorsContainer
private

The GCP error list

Definition at line 192 of file otbGCPsToRPCSensorModelImageFilter.h.

◆ m_GCPsContainer

template<class TImage >
GCPsContainerType otb::GCPsToRPCSensorModelImageFilter< TImage >::m_GCPsContainer
private

Container of GCPs

Definition at line 205 of file otbGCPsToRPCSensorModelImageFilter.h.

◆ m_ImageMetadata

template<class TImage >
ImageMetadata otb::GCPsToRPCSensorModelImageFilter< TImage >::m_ImageMetadata
private

◆ m_MeanElevation

template<class TImage >
double otb::GCPsToRPCSensorModelImageFilter< TImage >::m_MeanElevation
private

If no DEM is used, a MeanElevation over the image is used instead

Definition at line 202 of file otbGCPsToRPCSensorModelImageFilter.h.

◆ m_MeanError

template<class TImage >
double otb::GCPsToRPCSensorModelImageFilter< TImage >::m_MeanError
private

The mean error

Definition at line 195 of file otbGCPsToRPCSensorModelImageFilter.h.

◆ m_ModelUpToDate

template<class TImage >
bool otb::GCPsToRPCSensorModelImageFilter< TImage >::m_ModelUpToDate
mutableprivate

Flag to see if model is up-to-date

Definition at line 211 of file otbGCPsToRPCSensorModelImageFilter.h.

◆ m_RMSGroundError

template<class TImage >
double otb::GCPsToRPCSensorModelImageFilter< TImage >::m_RMSGroundError
private

The residual ground error

Definition at line 189 of file otbGCPsToRPCSensorModelImageFilter.h.

◆ m_UseDEM

template<class TImage >
bool otb::GCPsToRPCSensorModelImageFilter< TImage >::m_UseDEM
private

True if a DEM should be used

Definition at line 198 of file otbGCPsToRPCSensorModelImageFilter.h.

◆ m_UseImageGCPs

template<class TImage >
bool otb::GCPsToRPCSensorModelImageFilter< TImage >::m_UseImageGCPs
private

True to use GCPs from image metadata as well

Definition at line 186 of file otbGCPsToRPCSensorModelImageFilter.h.


The documentation for this class was generated from the following files: