USGS

Isis 3.0 Object Programmers' Reference

Home

Isis::ReseauDistortionMap Class Reference

#include <ReseauDistortionMap.h>

Inheritance diagram for Isis::ReseauDistortionMap:

Inheritance graph
[legend]
Collaboration diagram for Isis::ReseauDistortionMap:

Collaboration graph
[legend]
List of all members.

Detailed Description

Distort/undistort focal plane coordinates.

Creates a map for adding/removing optical distortions from the focal plane of the camera.

Author:
2005-06-08 Elizabeth Ribelin

For internal use only.

History:
2005-12-07 Elizabeth Miller - Added check for colinearity in closest reseaus to fix a bug

Definition at line 43 of file ReseauDistortionMap.h.

Public Member Functions

 ReseauDistortionMap (Camera *parent, Pvl &labels, const std::string &fname)
 Creates a ReseauDistortionMap object.
virtual bool SetFocalPlane (const double dx, const double dy)
 Finds the undistorted x/y position of the given distorted point.
virtual bool SetUndistortedFocalPlane (const double ux, const double uy)
 Finds the distorted x/y position of the given undistorted point.
void SetDistortion (const int naifIkCode)
 Load distortion coefficients.
double FocalPlaneX () const
 Return distorted focal plane x.
double FocalPlaneY () const
 Return distorted focal plane y.
double UndistortedFocalPlaneX () const
 Return undistorted focal plane x.
double UndistortedFocalPlaneY () const
 Return undistorted focal plane y.
double UndistortedFocalPlaneZ () const
 Return undistorted focal plane z.

Protected Attributes

Camerap_camera
double p_focalPlaneX
double p_focalPlaneY
double p_undistortedFocalPlaneX
double p_undistortedFocalPlaneY
double p_zDirection
std::vector< double > p_odk

Private Attributes

std::vector< double > p_rlines
std::vector< double > p_rsamps
 Refined Reseau Locations.
std::vector< double > p_mlines
std::vector< double > p_msamps
 Master Reseau Locations.
double p_distortedLines
double p_distortedSamps
 Dimensions of distorted cube.
double p_undistortedLines
double p_undistortedSamps
 Dimensions of undistorted cube.
int p_numRes
 Number of Reseaus.
double p_pixelPitch
 Pixel Pitch of parent Camera.


Constructor & Destructor Documentation

Isis::ReseauDistortionMap::ReseauDistortionMap ( Camera parent,
Pvl labels,
const std::string &  fname 
)

Creates a ReseauDistortionMap object.

Parameters:
parent The parent camera model
labels The pvl labels to get the Reference Reseau location from
fname The filename containing master reseau location for the particular camera
Exceptions:
Isis::iException::User - There are not the same amount of master and refined reseaus

Definition at line 44 of file ReseauDistortionMap.cpp.

References _FILEINFO_, Isis::PvlObject::FindGroup(), Isis::PvlContainer::FindKeyword(), Isis::iException::Message(), p_distortedLines, p_distortedSamps, p_mlines, p_msamps, p_numRes, p_pixelPitch, p_rlines, p_rsamps, p_undistortedLines, p_undistortedSamps, Isis::Camera::PixelPitch(), Isis::PvlKeyword::Size(), and Isis::PvlObject::Traverse.


Member Function Documentation

double Isis::CameraDistortionMap::FocalPlaneX (  )  const [inline, inherited]

Return distorted focal plane x.

Definition at line 62 of file CameraDistortionMap.h.

References Isis::CameraDistortionMap::p_focalPlaneX.

Referenced by Isis::PushFrameCameraGroundMap::FindDistance(), Isis::LineScanCameraGroundMap::FindFocalPlane(), Isis::Camera::RawFocalPlanetoImage(), Isis::Camera::SetRightAscensionDeclination(), and Isis::LineScanCameraSkyMap::SetSky().

double Isis::CameraDistortionMap::FocalPlaneY (  )  const [inline, inherited]

Return distorted focal plane y.

Definition at line 65 of file CameraDistortionMap.h.

References Isis::CameraDistortionMap::p_focalPlaneY.

Referenced by Isis::PushFrameCameraGroundMap::FindDistance(), Isis::LineScanCameraGroundMap::FindFocalPlane(), Isis::Camera::RawFocalPlanetoImage(), Isis::Camera::SetRightAscensionDeclination(), and Isis::LineScanCameraSkyMap::SetSky().

void Isis::CameraDistortionMap::SetDistortion ( const int  naifIkCode  )  [inherited]

Load distortion coefficients.

This method loads the distortion coefficients from the instrument kernel. The coefficients in the NAIF instrument kernel are expected to be in the form of:

 INSxxxxx_OD_K = ( coef1, coef2, ..., coefN)

 where xxxxx is the instrument code (always a negative number)

These coefficient will be used to convert from focal plane x,y to undistorted x,y as follows (add equation here)

Parameters:
naifIkCode Code to search for in instrument kernel
Todo:
Generalize to read variable number of coefficients

Add latex equation to the documentation

Reimplemented in Isis::Lo::LoHighDistortionMap, Isis::Lo::LoMediumDistortionMap, Isis::Lro::LroNarrowAngleDistortionMap, and Isis::TaylorCameraDistortionMap.

Definition at line 64 of file CameraDistortionMap.cpp.

References Isis::CameraDistortionMap::p_camera, and Isis::CameraDistortionMap::p_odk.

Referenced by Isis::Mro::CTXCamera::CTXCamera(), Isis::Mro::HiriseCamera::HiriseCamera(), Isis::Messenger::MdisCamera::MdisCamera(), Isis::Lo::LoMediumDistortionMap::SetDistortion(), and Isis::Lo::LoHighDistortionMap::SetDistortion().

bool Isis::ReseauDistortionMap::SetFocalPlane ( const double  dx,
const double  dy 
) [virtual]

Finds the undistorted x/y position of the given distorted point.

Parameters:
dx The distorted x position of the point
dy The distorted y position of the point
Returns:
bool Returns true if the undistortion was completed successful, and false if it was not

Reimplemented from Isis::CameraDistortionMap.

Definition at line 96 of file ReseauDistortionMap.cpp.

References Isis::Statistics::AddData(), Isis::LeastSquares::AddKnown(), Isis::CameraFocalPlaneMap::DetectorLineOrigin(), Isis::CameraFocalPlaneMap::DetectorSampleOrigin(), Isis::LeastSquares::Evaluate(), Isis::Camera::FocalPlaneMap(), line, Isis::CameraDistortionMap::p_camera, Isis::CameraDistortionMap::p_focalPlaneX, Isis::CameraDistortionMap::p_focalPlaneY, p_mlines, p_msamps, p_numRes, p_pixelPitch, p_rlines, p_rsamps, Isis::CameraDistortionMap::p_undistortedFocalPlaneX, Isis::CameraDistortionMap::p_undistortedFocalPlaneY, p_undistortedLines, p_undistortedSamps, Isis::LeastSquares::Solve(), and Isis::Statistics::StandardDeviation().

bool Isis::ReseauDistortionMap::SetUndistortedFocalPlane ( const double  ux,
const double  uy 
) [virtual]

Finds the distorted x/y position of the given undistorted point.

Parameters:
ux The undistorted x position of the point
uy The undistorted y position of the point
Returns:
bool Returns true if the distortion was completed successful, and false if it was not

Reimplemented from Isis::CameraDistortionMap.

Definition at line 208 of file ReseauDistortionMap.cpp.

References Isis::Statistics::AddData(), Isis::LeastSquares::AddKnown(), Isis::CameraFocalPlaneMap::DetectorLineOrigin(), Isis::CameraFocalPlaneMap::DetectorSampleOrigin(), Isis::LeastSquares::Evaluate(), Isis::Camera::FocalPlaneMap(), line, Isis::CameraDistortionMap::p_camera, Isis::CameraDistortionMap::p_focalPlaneX, Isis::CameraDistortionMap::p_focalPlaneY, p_mlines, p_msamps, p_numRes, p_pixelPitch, p_rlines, p_rsamps, Isis::CameraDistortionMap::p_undistortedFocalPlaneX, Isis::CameraDistortionMap::p_undistortedFocalPlaneY, p_undistortedLines, p_undistortedSamps, Isis::LeastSquares::Solve(), and Isis::Statistics::StandardDeviation().

double Isis::CameraDistortionMap::UndistortedFocalPlaneX (  )  const [inline, inherited]

Return undistorted focal plane x.

Definition at line 68 of file CameraDistortionMap.h.

References Isis::CameraDistortionMap::p_undistortedFocalPlaneX.

Referenced by Isis::ControlPoint::ComputeApriori(), and Isis::Camera::SetImage().

double Isis::CameraDistortionMap::UndistortedFocalPlaneY (  )  const [inline, inherited]

Return undistorted focal plane y.

Definition at line 71 of file CameraDistortionMap.h.

References Isis::CameraDistortionMap::p_undistortedFocalPlaneY.

Referenced by Isis::ControlPoint::ComputeApriori(), and Isis::Camera::SetImage().

double Isis::CameraDistortionMap::UndistortedFocalPlaneZ (  )  const [inline, inherited]

Return undistorted focal plane z.

Definition at line 74 of file CameraDistortionMap.h.

Referenced by Isis::BundleAdjust::AddPartials(), and Isis::Camera::SetImage().


Member Data Documentation

double Isis::ReseauDistortionMap::p_distortedSamps [private]

Dimensions of distorted cube.

Definition at line 54 of file ReseauDistortionMap.h.

Referenced by ReseauDistortionMap().

std::vector<double> Isis::ReseauDistortionMap::p_msamps [private]

Master Reseau Locations.

Definition at line 53 of file ReseauDistortionMap.h.

Referenced by ReseauDistortionMap(), SetFocalPlane(), and SetUndistortedFocalPlane().

int Isis::ReseauDistortionMap::p_numRes [private]

Number of Reseaus.

Definition at line 58 of file ReseauDistortionMap.h.

Referenced by ReseauDistortionMap(), SetFocalPlane(), and SetUndistortedFocalPlane().

double Isis::ReseauDistortionMap::p_pixelPitch [private]

Pixel Pitch of parent Camera.

Definition at line 59 of file ReseauDistortionMap.h.

Referenced by ReseauDistortionMap(), SetFocalPlane(), and SetUndistortedFocalPlane().

std::vector<double> Isis::ReseauDistortionMap::p_rsamps [private]

Refined Reseau Locations.

Definition at line 52 of file ReseauDistortionMap.h.

Referenced by ReseauDistortionMap(), SetFocalPlane(), and SetUndistortedFocalPlane().

double Isis::ReseauDistortionMap::p_undistortedSamps [private]

Dimensions of undistorted cube.

Definition at line 56 of file ReseauDistortionMap.h.

Referenced by ReseauDistortionMap(), SetFocalPlane(), and SetUndistortedFocalPlane().


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