Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | Related Functions | List of all members
vpgl_nitf_rational_camera Class Reference

#include <vpgl_nitf_rational_camera.h>

Inheritance diagram for vpgl_nitf_rational_camera:
Inheritance graph
[legend]

Public Types

enum  geopt_coord { LAT, LON }
 
enum  coor_index
 enumeration for indexing coordinates. More...
 
enum  poly_index
 enumeration for indexing polynomials. More...
 

Public Member Functions

 vpgl_nitf_rational_camera ()
 
 vpgl_nitf_rational_camera (std::string const &nitf_image_path, bool verbose=false)
 Construct from a nitf image file. More...
 
 vpgl_nitf_rational_camera (vil_nitf2_image *nift_image, bool verbose=false)
 Construct from a nitf image. More...
 
std::string rational_extension_type () const
 
std::string image_id () const
 
vnl_double_2 upper_left () const
 Geographic coordinates of image corners. More...
 
vnl_double_2 upper_right () const
 
vnl_double_2 lower_left () const
 
vnl_double_2 lower_right () const
 
std::string type_name () const override
 class identity functions for casting. More...
 
virtual vpgl_rational_camera< double > * clone (void) const
 Clone ‘this’: creation of a new object and initialization. More...
 
bool operator== (vpgl_rational_camera< double > const &that) const
 Equality test. More...
 
void set_coefficients (std::vector< std::vector< double > > const &rational_coeffs)
 set rational polynomial coefficients. More...
 
void set_coefficients (vnl_matrix_fixed< double, 4, 20 > const &rational_coeffs)
 
void set_scale_offsets (std::vector< vpgl_scale_offset< double > > const &scale_offsets)
 set coordinate scale and offsets. More...
 
vnl_matrix_fixed< double, 4, 20 > coefficient_matrix () const
 get the rational polynomial coefficients in a vnl matrix. More...
 
std::vector< std::vector< double > > coefficients () const
 get the rational polynomial coefficients in a vcl array. More...
 
std::vector< vpgl_scale_offset< double > > scale_offsets () const
 get the scale and offsets in a vector. More...
 
void set_scale (const coor_index coor_index, const double scale)
 set a specific scale value. More...
 
void set_offset (const coor_index coor_index, const double offset)
 set a specific scale value. More...
 
double scale (const coor_index coor_index) const
 get a specific scale value. More...
 
double offset (const coor_index coor_index) const
 get a specific offset value. More...
 
vpgl_scale_offset< double > scl_off (const coor_index coor_index) const
 get a specific scale_offset. More...
 
void set_image_offset (const double u_off, const double v_off)
 set u-v translation offset. More...
 
void image_offset (double &u_off, double &v_off) const
 get u-v translation offset. More...
 
void set_image_scale (const double u_scale, const double v_scale)
 set u-v scale. More...
 
void image_scale (double &u_scale, double &v_scale)
 get u-v scale. More...
 
void project (const double x, const double y, const double z, double &u, double &v) const override
 The generic camera interface. u represents image column, v image row. More...
 
virtual vnl_vector_fixed< double, 2 > project (vnl_vector_fixed< double, 3 > const &world_point) const
 Project a world point onto the image. More...
 
virtual vgl_point_2d< double > project (vgl_point_3d< double > world_point) const
 Project a world point onto the image. More...
 
virtual void print (std::ostream &s=std::cout) const
 print the camera parameters. More...
 
virtual bool save (std::string cam_path)
 
std::string is_a () const
 
bool is_class (std::string const &name) const
 
void ref ()
 
void unref ()
 
long get_references () const
 
bool is_referenced () const
 

Protected Member Functions

vnl_vector_fixed< double, 20 > power_vector (const double x, const double y, const double z) const
 Create a vector with the standard order of monomial terms. More...
 

Protected Attributes

vnl_matrix_fixed< double, 4, 20 > rational_coeffs_
 
std::vector< vpgl_scale_offset< double > > scale_offsets_
 

Private Member Functions

void set_order_b (int *)
 
bool init (vil_nitf2_image *nitf_image, bool verbose)
 

Private Attributes

std::string nitf_rational_type_
 
std::string image_id_
 
std::string image_igeolo_
 
vnl_double_2 ul_
 geo-coordinates of image corners. More...
 
vnl_double_2 ur_
 
vnl_double_2 ll_
 
vnl_double_2 lr_
 

Related Functions

(Note that these are not member functions.)

std::ostream & operator<< (std::ostream &s, const vpgl_rational_camera< double > &p)
 Write to stream. More...
 
std::istream & operator>> (std::istream &is, vpgl_rational_camera< double > &p)
 Read from stream. More...
 
vpgl_rational_camera< double > * read_rational_camera (std::string cam_path)
 Creates a rational camera from a file. More...
 
vpgl_rational_camera< double > * read_rational_camera (std::istream &istr)
 Creates a rational camera from a stream. More...
 
vpgl_rational_camera< double > * read_rational_camera_from_txt (std::string cam_path)
 Creates a rational camera from a txt file. More...
 

Detailed Description

Definition at line 32 of file vpgl_nitf_rational_camera.h.

Member Enumeration Documentation

◆ coor_index

enumeration for indexing coordinates.

Definition at line 111 of file vpgl_rational_camera.h.

◆ geopt_coord

Enumerator
LAT 
LON 

Definition at line 36 of file vpgl_nitf_rational_camera.h.

◆ poly_index

enumeration for indexing polynomials.

Definition at line 113 of file vpgl_rational_camera.h.

Constructor & Destructor Documentation

◆ vpgl_nitf_rational_camera() [1/3]

vpgl_nitf_rational_camera::vpgl_nitf_rational_camera ( )
default

◆ vpgl_nitf_rational_camera() [2/3]

vpgl_nitf_rational_camera::vpgl_nitf_rational_camera ( std::string const &  nitf_image_path,
bool  verbose = false 
)

Construct from a nitf image file.

Definition at line 338 of file vpgl_nitf_rational_camera.cxx.

◆ vpgl_nitf_rational_camera() [3/3]

vpgl_nitf_rational_camera::vpgl_nitf_rational_camera ( vil_nitf2_image *  nift_image,
bool  verbose = false 
)

Construct from a nitf image.

Definition at line 382 of file vpgl_nitf_rational_camera.cxx.

Member Function Documentation

◆ clone()

vpgl_rational_camera< double > * vpgl_rational_camera< double >::clone ( void  ) const
virtualinherited

Clone ‘this’: creation of a new object and initialization.

See Prototype pattern

Definition at line 102 of file vpgl_rational_camera.hxx.

◆ coefficient_matrix()

vnl_matrix_fixed<double , 4, 20> vpgl_rational_camera< double >::coefficient_matrix ( ) const
inlineinherited

get the rational polynomial coefficients in a vnl matrix.

Definition at line 174 of file vpgl_rational_camera.h.

◆ coefficients()

std::vector< std::vector< double > > vpgl_rational_camera< double >::coefficients ( ) const
inherited

get the rational polynomial coefficients in a vcl array.

Definition at line 124 of file vpgl_rational_camera.hxx.

◆ image_id()

std::string vpgl_nitf_rational_camera::image_id ( ) const
inline

Definition at line 49 of file vpgl_nitf_rational_camera.h.

◆ image_offset()

void vpgl_rational_camera< double >::image_offset ( double &  u_off,
double &  v_off 
) const
inlineinherited

get u-v translation offset.

Definition at line 205 of file vpgl_rational_camera.h.

◆ image_scale()

void vpgl_rational_camera< double >::image_scale ( double &  u_scale,
double &  v_scale 
)
inlineinherited

get u-v scale.

Definition at line 214 of file vpgl_rational_camera.h.

◆ init()

bool vpgl_nitf_rational_camera::init ( vil_nitf2_image *  nitf_image,
bool  verbose 
)
private

Definition at line 244 of file vpgl_nitf_rational_camera.cxx.

◆ is_a()

std::string vpgl_camera< double >::is_a ( ) const
inlineinherited

Definition at line 40 of file vpgl_camera.h.

◆ is_class()

bool vpgl_camera< double >::is_class ( std::string const &  name) const
inlineinherited

Definition at line 41 of file vpgl_camera.h.

◆ lower_left()

vnl_double_2 vpgl_nitf_rational_camera::lower_left ( ) const
inline

Definition at line 54 of file vpgl_nitf_rational_camera.h.

◆ lower_right()

vnl_double_2 vpgl_nitf_rational_camera::lower_right ( ) const
inline

Definition at line 55 of file vpgl_nitf_rational_camera.h.

◆ offset()

double vpgl_rational_camera< double >::offset ( const coor_index  coor_index) const
inlineinherited

get a specific offset value.

Definition at line 191 of file vpgl_rational_camera.h.

◆ operator==()

bool vpgl_rational_camera< double >::operator== ( vpgl_rational_camera< double > const &  that) const
inlineinherited

Equality test.

Definition at line 160 of file vpgl_rational_camera.h.

◆ power_vector()

vnl_vector_fixed< double , 20 > vpgl_rational_camera< double >::power_vector ( const double  x,
const double  y,
const double  z 
) const
protectedinherited

Create a vector with the standard order of monomial terms.

Definition at line 139 of file vpgl_rational_camera.hxx.

◆ print()

void vpgl_rational_camera< double >::print ( std::ostream &  s = std::cout) const
virtualinherited

print the camera parameters.

Definition at line 234 of file vpgl_rational_camera.hxx.

◆ project() [1/3]

void vpgl_rational_camera< double >::project ( const double  x,
const double  y,
const double  z,
double &  u,
double &  v 
) const
overridevirtualinherited

The generic camera interface. u represents image column, v image row.

Implements vpgl_camera< double >.

Definition at line 197 of file vpgl_rational_camera.hxx.

◆ project() [2/3]

vnl_vector_fixed< double , 2 > vpgl_rational_camera< double >::project ( vnl_vector_fixed< double , 3 > const &  world_point) const
virtualinherited

Project a world point onto the image.

Definition at line 215 of file vpgl_rational_camera.hxx.

◆ project() [3/3]

vgl_point_2d< double > vpgl_rational_camera< double >::project ( vgl_point_3d< double >  world_point) const
virtualinherited

Project a world point onto the image.

Definition at line 225 of file vpgl_rational_camera.hxx.

◆ rational_extension_type()

std::string vpgl_nitf_rational_camera::rational_extension_type ( ) const
inline

Definition at line 47 of file vpgl_nitf_rational_camera.h.

◆ save()

bool vpgl_rational_camera< double >::save ( std::string  cam_path)
virtualinherited

Definition at line 347 of file vpgl_rational_camera.hxx.

◆ scale()

double vpgl_rational_camera< double >::scale ( const coor_index  coor_index) const
inlineinherited

get a specific scale value.

Definition at line 188 of file vpgl_rational_camera.h.

◆ scale_offsets()

std::vector<vpgl_scale_offset<double > > vpgl_rational_camera< double >::scale_offsets ( ) const
inlineinherited

get the scale and offsets in a vector.

Definition at line 179 of file vpgl_rational_camera.h.

◆ scl_off()

vpgl_scale_offset<double > vpgl_rational_camera< double >::scl_off ( const coor_index  coor_index) const
inlineinherited

get a specific scale_offset.

Definition at line 194 of file vpgl_rational_camera.h.

◆ set_coefficients() [1/2]

void vpgl_rational_camera< double >::set_coefficients ( std::vector< std::vector< double > > const &  rational_coeffs)
inherited

set rational polynomial coefficients.

Definition at line 109 of file vpgl_rational_camera.hxx.

◆ set_coefficients() [2/2]

void vpgl_rational_camera< double >::set_coefficients ( vnl_matrix_fixed< double , 4, 20 > const &  rational_coeffs)
inlineinherited

Definition at line 169 of file vpgl_rational_camera.h.

◆ set_image_offset()

void vpgl_rational_camera< double >::set_image_offset ( const double  u_off,
const double  v_off 
)
inlineinherited

set u-v translation offset.

Definition at line 200 of file vpgl_rational_camera.h.

◆ set_image_scale()

void vpgl_rational_camera< double >::set_image_scale ( const double  u_scale,
const double  v_scale 
)
inlineinherited

set u-v scale.

Definition at line 209 of file vpgl_rational_camera.h.

◆ set_offset()

void vpgl_rational_camera< double >::set_offset ( const coor_index  coor_index,
const double  offset 
)
inlineinherited

set a specific scale value.

Definition at line 185 of file vpgl_rational_camera.h.

◆ set_order_b()

void vpgl_nitf_rational_camera::set_order_b ( int *  ord)
private

Definition at line 219 of file vpgl_nitf_rational_camera.cxx.

◆ set_scale()

void vpgl_rational_camera< double >::set_scale ( const coor_index  coor_index,
const double  scale 
)
inlineinherited

set a specific scale value.

Definition at line 182 of file vpgl_rational_camera.h.

◆ set_scale_offsets()

void vpgl_rational_camera< double >::set_scale_offsets ( std::vector< vpgl_scale_offset< double > > const &  scale_offsets)
inherited

set coordinate scale and offsets.

Definition at line 118 of file vpgl_rational_camera.hxx.

◆ type_name()

std::string vpgl_rational_camera< double >::type_name ( ) const
inlineoverridevirtualinherited

class identity functions for casting.

Reimplemented from vpgl_camera< double >.

Definition at line 153 of file vpgl_rational_camera.h.

◆ upper_left()

vnl_double_2 vpgl_nitf_rational_camera::upper_left ( ) const
inline

Geographic coordinates of image corners.

Definition at line 52 of file vpgl_nitf_rational_camera.h.

◆ upper_right()

vnl_double_2 vpgl_nitf_rational_camera::upper_right ( ) const
inline

Definition at line 53 of file vpgl_nitf_rational_camera.h.

Friends And Related Function Documentation

◆ operator<<()

std::ostream & operator<< ( std::ostream &  s,
const vpgl_rational_camera< double > &  p 
)
related

Write to stream.

◆ operator>>()

std::istream & operator>> ( std::istream &  is,
vpgl_rational_camera< double > &  p 
)
related

Read from stream.

◆ read_rational_camera() [1/2]

vpgl_rational_camera< double > * read_rational_camera ( std::string  cam_path)
related

Creates a rational camera from a file.

◆ read_rational_camera() [2/2]

vpgl_rational_camera< double > * read_rational_camera ( std::istream &  istr)
related

Creates a rational camera from a stream.

◆ read_rational_camera_from_txt()

vpgl_rational_camera< double > * read_rational_camera_from_txt ( std::string  cam_path)
related

Creates a rational camera from a txt file.

Definition at line 625 of file vpgl_rational_camera.hxx.

Member Data Documentation

◆ image_id_

std::string vpgl_nitf_rational_camera::image_id_
private

Definition at line 64 of file vpgl_nitf_rational_camera.h.

◆ image_igeolo_

std::string vpgl_nitf_rational_camera::image_igeolo_
private

Definition at line 65 of file vpgl_nitf_rational_camera.h.

◆ ll_

vnl_double_2 vpgl_nitf_rational_camera::ll_
private

Definition at line 69 of file vpgl_nitf_rational_camera.h.

◆ lr_

vnl_double_2 vpgl_nitf_rational_camera::lr_
private

Definition at line 70 of file vpgl_nitf_rational_camera.h.

◆ nitf_rational_type_

std::string vpgl_nitf_rational_camera::nitf_rational_type_
private

Definition at line 63 of file vpgl_nitf_rational_camera.h.

◆ rational_coeffs_

vnl_matrix_fixed<double , 4, 20> vpgl_rational_camera< double >::rational_coeffs_
protectedinherited

Definition at line 239 of file vpgl_rational_camera.h.

◆ scale_offsets_

std::vector<vpgl_scale_offset<double > > vpgl_rational_camera< double >::scale_offsets_
protectedinherited

Definition at line 240 of file vpgl_rational_camera.h.

◆ ul_

vnl_double_2 vpgl_nitf_rational_camera::ul_
private

geo-coordinates of image corners.

Definition at line 67 of file vpgl_nitf_rational_camera.h.

◆ ur_

vnl_double_2 vpgl_nitf_rational_camera::ur_
private

Definition at line 68 of file vpgl_nitf_rational_camera.h.


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