Commit 961e28bd authored by Makayla Shepherd's avatar Makayla Shepherd
Browse files

Updated documentation for ApolloPanoramicIO, ApolloPanoramicCamera, and...

Updated documentation for ApolloPanoramicIO, ApolloPanoramicCamera, and ApolloPanoramicDetectorMap. References #4807.

git-svn-id: http://subversion.wr.usgs.gov/repos/prog/isis3/trunk@7803 41f8697f-d340-4b68-9986-7bafba869bb8
parent e2af08d0
Loading
Loading
Loading
Loading
+13 −7
Original line number Diff line number Diff line
@@ -14,17 +14,23 @@ using namespace std;

namespace Isis {

  //! Constructs an ApolloPanIO object
  /**
   * Constructs an ApolloPanIO object
   */
  ApolloPanIO::ApolloPanIO() {
    this->initialize();
  }

  //! Destroys the ApolloPanObject
  /**
   * Destroys the ApolloPanObject
   */
  ApolloPanIO::~ApolloPanIO() {
    //empty destructor....
  }

  //! Initilizes member vairables in preparation for solving for the interior orientation affines
  /**
   * Initilizes member variables in preparation for solving for the interior orientation affines
   */
  void ApolloPanIO::initialize() {
    int i;

@@ -569,9 +575,9 @@ namespace Isis {
   *
   * @param machineY Input, the y coordinate (line) in cube space
   *
   * @param machineX Output, the x coordinate (sample) in cube space
   * @param imageX Output, the x coordinate (sample) in cube space
   *
   * @param machineY Output, the y coordinate (line) in cube space
   * @param imageY Output, the y coordinate (line) in cube space
   *
   * @return 1  success
   * @return -1 failure, y coordinate to be converted is too small, it is not within the 
@@ -648,9 +654,9 @@ namespace Isis {
   * to a cube (sample, line) coordinates.
   * Call after computeInteriorOrienation()
   *
   * @param machineX Input, the x coordinate (sample) in cube space
   * @param imageX Input, the x coordinate (sample) in cube space
   *
   * @param machineY INput, the y coordinate (line) in cube space
   * @param imageY INput, the y coordinate (line) in cube space
   *
   * @param machineX Output, the x coordinate (sample) in cube space
   *
+40 −26
Original line number Diff line number Diff line
@@ -52,48 +52,62 @@ namespace Isis {
  * @internal                                                              
  *   @history 2011-09-19 Orrin Thomas - Original version
  *   @history 2012-07-10 Orrin Thomas - Updated to current coding standards
  *   @history 2017-06-28 Makayla Shepherd - Updated documentation. References #4807.
  */        
  class ApolloPanIO
  {
  private:
    /*  C style structure for storing the calculation optimized parameters of a foreward and
    
    /** 
     * C style structure for storing the calculation optimized parameters of a forward and
     * reverse 2D affine transformation
     */
    typedef struct Affine2D {
      int flag;      //solve flag
      double A2I[6];    //transformation coefficients to go to image coordinates
      double A2M[6];    //transformation coefficients to go to machine coordinates
      double rotM[2];    //coefficients to rotate machine coordinates so that the right edge of the region is vertical    
      double rotI[2];     //coefficients to rotate Image coordinates so that the right edge of the region is vertical
      double mI;    //max rotated image y coordinate in the region
      double mM;    //max rotate machine y coordinate in the region
      int indeces[2];  //indeces of the first and last fiducial marks included in this region
      int flag;         //!< solve flag
      double A2I[6];    //!< transformation coefficients to go to image coordinates
      double A2M[6];    //!< transformation coefficients to go to machine coordinates
      
      /**
       * Coefficients to rotate machine coordinates so that the right edge of the region is vertical
       */
      double rotM[2];   
      
      /**
       * Coefficients to rotate Image coordinates so that the right edge of the region is vertical
       */
      double rotI[2];  
      
      double mI;        //!< max rotated image y coordinate in the region
      double mM;        //!< max rotate machine y coordinate in the region
      int indeces[2];   //!< indeces of the first and last fiducial marks included in this region
    }Affine2D;

    //! C Style structure for storing measured fiducial coorinates
    /**
     * C Style structure for storing measured fiducial coordinates
     */
    typedef struct FidObs {
      int flag;  //flag to tell if the observation has been made
      double mach[2];  //machine coordinates of the fiducial mark
      double image[2]; //theoretically perfect image coordinates
      double residuals[2];  //residuals of the fiducial mark measurement in machine coordinates
      int flag;             //!< flag to tell if the observation has been made
      double mach[2];       //!< machine coordinates of the fiducial mark
      double image[2];      //!< theoretically perfect image coordinates
      double residuals[2];  //!< residuals of the fiducial mark measurement in machine coordinates
    }FidObs;

    Affine2D affines[44];  //an array of discreet affine transformations pertaining to regions of the image (there can never be more than 44)

    FidObs obs[90];  //array to hold all possible observations of fiducial marks

    int n;   //the number of affines used to model the image
    /**
     * an array of discreet affine transformations pertaining to regions of the image 
     * (there can never be more than 44)
     */
    Affine2D affines[44];

    //! maximum residual vector length
    double maxR;
    //! mean of residual vector lenghts
    double meanR;     
    //! standard deviation of residual vector lengths
    double stdevR;    
    FidObs obs[90];  //!< array to hold all possible observations of fiducial marks
    int n;           //!< the number of affines used to model the image
    double maxR;     //!< maximum residual vector length
    double meanR;    //!< mean of residual vector lenghts  
    double stdevR;   //!< standard deviation of residual vector lengths 

    void calc_residual_stats();

  public:

    ApolloPanIO();

    ~ApolloPanIO();
+20 −5
Original line number Diff line number Diff line
@@ -48,6 +48,7 @@ namespace Isis {
     *                           members and methods and removed implementation of these methods
     *                           since Camera now handles this. References #2335. Fixed 
     *                           indentation.
     *   @history 2017-06-28 Makayla Shepherd - Updated documentation. References #4807.
     */        
    class ApolloPanoramicCamera : public LineScanCamera {
    public:
@@ -81,18 +82,32 @@ namespace Isis {
      */
      virtual int SpkReferenceId() const { return (1); }

      /** Returns residual summary statistics from interior orientation as a PvlGroup
      /** 
       * Returns residual summary statistics from interior orientation as a PvlGroup
       * 
       * @return PvlGroup Residuals report.
       */
      PvlGroup intOriResidualsReport();

      //! Max interior orientation residual vector length, accesor
      /**
       * Max interior orientation residual vector length, accesor
       * 
       * @return double Residual max
       */
      double intOriResidualMax()   const { return m_residualMax; }

      //! Mean (average) of interior orientation residual vector length, accesor
      /**
       * Mean (average) of interior orientation residual vector length, accesor
       * 
       * @return double Residual mean
       */
      double intOriResidualMean()  const { return m_residualMean; }

      //! Standard deviation of interior orientation residual vector length, accesor
      /**
       * Standard deviation of interior orientation residual vector length, accesor
       * 
       * @return double Residual standard deviation
       */
      double intOriResidualStdev() const { return m_residualStdev; }

    private:
+9 −13
Original line number Diff line number Diff line
@@ -14,9 +14,9 @@ namespace Isis {
   * This method sets cube sample line coordinates from given Dector coordinates
   *
   * @param sample dector sample coordinate
   *
   * @param line detector line coordinate
   *
   * @return bool Always returns true
   */
    bool ApolloPanoramicDetectorMap::SetDetector(const double sample, const double line) {
      //given a detector coordinate and a time (read from the 'parent' camera class) 
@@ -43,9 +43,9 @@ namespace Isis {
   * This method sets dector sample line coordinates from given cube coordinates
   *
   * @param sample cube sample coordinate
   *
   * @param line cube line coordinate
   *
   * @return bool Always returns true
   */
    bool ApolloPanoramicDetectorMap::SetParent(const double sample, const double line) {
      //Given an image (aka 'Parent', aka encoder, aka machine) coordinate set the detector 
@@ -77,17 +77,13 @@ namespace Isis {
     * This method uses the ApolloPanIO class to compute transforamtion from cube to image 
     * (aka fiducial cooraintes)
     * 
     * @return -1 failure
     *
     * @return  1 sucess
     * 
     * @throws  No FID_MEASURES table found in cube blobs.
     *
     * @throws  Less than four FID_MEASURES found in cube blobs.
     * @throws  IException::User "No FID_MEASURES table found in cube blobs."
     * @throws  IException::User "Less than four FID_MEASURES found in cube blobs."
     * @throws  IException::User "Insufficient Fiducial Observations for computation of the interior
     *                            orientation. At least one vertical pair must be measured, many 
     *                            more is recomented."
     * 
     * @throws  Insufficient Fiducial Observations for computation of 
     *          the interior orientation.\nAt least one vertical pair 
     *          must be measured, many more is recomented.
     * @returns int Returns 1 on success and -1 on failure.
     */
    int ApolloPanoramicDetectorMap::initializeInteriorOrientation() {
      int i,nrec;
+30 −14
Original line number Diff line number Diff line
@@ -43,6 +43,7 @@ namespace Isis {
     * @internal                                                              
     *   @history 2011-11-21 Orrin Thomas - Original version
     *   @history 2012-07-10 Orrin Thomas - Updated to current coding standards
     *   @history 2017-06-28 Makayla Shepherd - Updated documentation. References #4807.
     */        
    class ApolloPanoramicDetectorMap : public CameraDetectorMap {
    public:
@@ -78,36 +79,51 @@ namespace Isis {
       *
       * @param lineRate the time in seconds between lines
       *
       * @return void
       */
      void SetLineRate(const double lineRate) {
        m_lineRate = lineRate;
      };

      //! Return the time in seconds between scan lines
      /**
       * Return the time in seconds between scan lines
       * 
       * @return double Time in seconds between scan lines
       */
      double LineRate() const {
        return m_lineRate;
      };

      //! Mean (average) of interior orientation residual vector lengths, accesor
      /**
       * Mean (average) of interior orientation residual vector lengths, accesor
       * 
       * @return double Mean of interior orientation residual vector lengths
       */
      double  meanResidual() { return p_intOri.meanResiduals(); };

      //! Max interior orientation residual vector length, accesor
      /**
       * Max interior orientation residual vector length, accesor
       * 
       * @return double Max interior orientation residual vector length
       */
      double   maxResidual() { return p_intOri.maxResiduals(); };

      //! Standard deviation of interior orientation residual vector lengths, accesor
      /**
       * Standard deviation of interior orientation residual vector lengths, accesor
       * 
       * @return double Standard deviation of interior orientation residual vector lengths
       */
      double stdevResidual() { return p_intOri.stdevResiduals(); };

      private:
        //! Ephemeris time at the middle line
        double m_etMiddle;  
        
        //!line exposure duration
        double m_lineRate;
        double m_etMiddle; //!< Ephemeris time at the middle line 
        double m_lineRate; //!< line exposure duration
        Pvl *m_lab;        //!< Image label used to construct camera object

        //! Image label used to construct camera object    
        Pvl *m_lab;

        //! Class to preform transformations from cube coordiantes to image coordinates
        /**
         * Class to preform transformations from cube coordiantes to image coordinates
         */
        ApolloPanIO p_intOri;

        int initializeInteriorOrientation();