pcidsk_airphoto.h

00001 /******************************************************************************
00002  *
00003  * Purpose: Declaration of the Airphoto segment interface and the helper
00004  *          storage objects.
00005  * 
00006  ******************************************************************************
00007  * Copyright (c) 2010
00008  * PCI Geomatics, 50 West Wilmot Street, Richmond Hill, Ont, Canada
00009  *
00010  * Permission is hereby granted, free of charge, to any person obtaining a
00011  * copy of this software and associated documentation files (the "Software"),
00012  * to deal in the Software without restriction, including without limitation
00013  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
00014  * and/or sell copies of the Software, and to permit persons to whom the
00015  * Software is furnished to do so, subject to the following conditions:
00016  *
00017  * The above copyright notice and this permission notice shall be included
00018  * in all copies or substantial portions of the Software.
00019  *
00020  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
00021  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
00022  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
00023  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
00024  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
00025  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
00026  * DEALINGS IN THE SOFTWARE.
00027  ****************************************************************************/
00028 #ifndef __INCLUDE_PCIDSK_SRC_PCIDSK_AIRPHOTO_H
00029 #define __INCLUDE_PCIDSK_SRC_PCIDSK_AIRPHOTO_H
00030 
00031 #include "pcidsk_config.h"
00032 
00033 #include <vector>
00034 #include <string>
00035 #include <utility>
00036 
00037 namespace PCIDSK {
00042     class PCIDSK_DLL PCIDSKAPModelIOParams
00043     {
00044     public:
00045         PCIDSKAPModelIOParams(std::vector<double> const& imgtofocalx,
00046             std::vector<double> const& imgtofocaly,
00047             std::vector<double> const& focaltocolumn,
00048             std::vector<double> const& focaltorow,
00049             double focal_len,
00050             std::pair<double, double> const& prin_pt,
00051             std::vector<double> const& radial_dist);
00052         std::vector<double> const& GetImageToFocalPlaneXCoeffs(void) const;
00053         std::vector<double> const& GetImageToFocalPlaneYCoeffs(void) const;
00054         std::vector<double> const& GetFocalPlaneToColumnCoeffs(void) const;
00055         std::vector<double> const& GetFocalPlaneToRowCoeffs(void) const;
00056         
00057         double GetFocalLength(void) const;
00058         std::pair<double, double> const& GetPrincipalPoint(void) const;
00059         std::vector<double> const& GetRadialDistortionCoeffs(void) const;
00060     private:
00061         std::vector<double> imgtofocalx_;
00062         std::vector<double> imgtofocaly_;
00063         std::vector<double> focaltocolumn_;
00064         std::vector<double> focaltorow_;
00065         double focal_len_;
00066         std::pair<double, double> prin_point_;
00067         std::vector<double> rad_dist_coeff_;
00068     };
00069     
00074     class PCIDSK_DLL PCIDSKAPModelEOParams
00075     {
00076     public:
00077         PCIDSKAPModelEOParams(std::string const& rotation_type,
00078             std::vector<double> const& earth_to_body,
00079             std::vector<double> const& perspect_cen,
00080             unsigned int epsg_code = 0);
00081         std::string GetEarthToBodyRotationType(void) const;
00082         std::vector<double> const& GetEarthToBodyRotation(void) const;
00083         std::vector<double> const& GetPerspectiveCentrePosition(void) const;
00084         unsigned int GetEPSGCode(void) const;
00085     private:
00086         std::string rot_type_;
00087         std::vector<double> earth_to_body_;
00088         std::vector<double> perspective_centre_pos_;
00089         unsigned int epsg_code_;
00090     };
00091     
00092     class PCIDSK_DLL PCIDSKAPModelMiscParams
00093     {
00094     public:
00095         PCIDSKAPModelMiscParams(std::vector<double> const& decentering_coeffs,
00096                                 std::vector<double> const& x3dcoord,
00097                                 std::vector<double> const& y3dcoord,
00098                                 std::vector<double> const& z3dcoord,
00099                                 double radius,
00100                                 double rff,
00101                                 double min_gcp_hgt,
00102                                 double max_gcp_hgt,
00103                                 bool is_prin_pt_off,
00104                                 bool has_dist,
00105                                 bool has_decent,
00106                                 bool has_radius);
00107         std::vector<double> const& GetDecenteringDistortionCoeffs(void) const;
00108         std::vector<double> const& GetX3DCoord(void) const;
00109         std::vector<double> const& GetY3DCoord(void) const;
00110         std::vector<double> const& GetZ3DCoord(void) const;
00111         double GetRadius(void) const;
00112         double GetRFF(void) const; // radius * focal * focal
00113         double GetGCPMinHeight(void) const;
00114         double GetGCPMaxHeight(void) const;
00115         bool IsPrincipalPointOffset(void) const;
00116         bool HasDistortion(void) const;
00117         bool HasDecentering(void) const;
00118         bool HasRadius(void) const;
00119     private:
00120         std::vector<double> decentering_coeffs_;
00121         std::vector<double> x3dcoord_;
00122         std::vector<double> y3dcoord_;
00123         std::vector<double> z3dcoord_;
00124         double radius_, rff_, min_gcp_hgt_, max_gcp_hgt_;
00125         bool is_prin_pt_off_;
00126         bool has_dist_;
00127         bool has_decent_;
00128         bool has_radius_;
00129     };
00130     
00135     class PCIDSKAPModelSegment
00136     {
00137     public:
00138         virtual ~PCIDSKAPModelSegment() {}
00139 
00140         virtual unsigned int GetWidth(void) const = 0;
00141         virtual unsigned int GetHeight(void) const = 0;
00142         virtual unsigned int GetDownsampleFactor(void) const = 0;
00143 
00144         // Interior Orientation Parameters
00145         virtual PCIDSKAPModelIOParams const& GetInteriorOrientationParams(void) const = 0;
00146         
00147         // Exterior Orientation Parameters
00148         virtual PCIDSKAPModelEOParams const& GetExteriorOrientationParams(void) const = 0;
00149 
00150         // ProjInfo
00151         virtual PCIDSKAPModelMiscParams const& GetAdditionalParams(void) const = 0;
00152         
00153         virtual std::string GetMapUnitsString(void) const = 0;
00154         virtual std::string GetUTMUnitsString(void) const = 0;
00155         virtual std::vector<double> const& GetProjParams(void) const = 0;
00156         
00157     };
00158     
00159 } // end namespace PCIDSK
00160 
00161 #endif // __INCLUDE_PCIDSK_SRC_PCIDSK_AIRPHOTO_H
00162 

Generated on Fri Jul 16 16:01:31 2010 for libpcidsk by  doxygen 1.5.1