Commit b7b6227c authored by Stuart Sides's avatar Stuart Sides
Browse files

Added ingestion of mvic and leisa quality and error images

parent a4d47ccd
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -42,6 +42,7 @@ namespace Isis {
    p_zDirection = zDirection;
  }


  /** Load distortion coefficients
   *
   * This method loads the distortion coefficients from the instrument
@@ -68,6 +69,7 @@ namespace Isis {
    }
  }


  /** Compute undistorted focal plane x/y
   *
   * Compute undistorted focal plane x/y given a distorted focal plane x/y.
@@ -111,6 +113,7 @@ namespace Isis {
    return true;
  }


  /** Compute distorted focal plane x/y
   *
   * Compute distorted focal plane x/y given an undistorted focal plane x/y.
@@ -161,7 +164,7 @@ namespace Isis {
    double tolMilliMeters = p_camera->PixelPitch() / 100.0;
    int iteration = 0;
    do {
      // Don't get in a end-less loop.  This algorithm should
      // Don't get in an end-less loop.  This algorithm should
      // converge quickly.  If not then we are probably way outside
      // of the focal plane.  Just set the distorted position to the
      // undistorted position. Also, make sure the focal plane is less
@@ -187,11 +190,13 @@ namespace Isis {
    return true;
  }


  //! Return optical distortion polynomial coefficients
  std::vector<double> CameraDistortionMap::OpticalDistortionCoefficients() const {
    return p_odk;
  }


  //! Return the direction of the focal plane Z-axis
  double CameraDistortionMap::ZDirection() const {
    return p_zDirection;
+35 −11
Original line number Diff line number Diff line
@@ -40,6 +40,7 @@ namespace Isis {
    Init(parent, naifIkCode);
  }


  /** Construct mapping between detectors and focal plane x/y
   *
   * @param naifIkCode  code of the naif instrument for reading coefficients
@@ -48,9 +49,12 @@ namespace Isis {
  CameraFocalPlaneMap::CameraFocalPlaneMap(const int naifIkCode) {
    Init(0, naifIkCode);
  }


  CameraFocalPlaneMap::~CameraFocalPlaneMap(){
  }


 /**
  * Added new method to allow programmer to pass in affine coefficients
  * 
@@ -126,7 +130,8 @@ namespace Isis {
    }
  }

  /** Compute detector position from focal plane coordinate

  /** Compute detector position (sample,line) from focal plane coordinates
   *
   * This method will compute both the centered and normal detector position
   * given a distorted focal plane coordinate.
@@ -140,15 +145,14 @@ namespace Isis {
    p_focalPlaneX = dx;
    p_focalPlaneY = dy;

    p_centeredDetectorSample = p_itranss[0] + (p_itranss[1] * dx)
                               + (p_itranss[2] * dy);
    p_centeredDetectorLine   = p_itransl[0] + (p_itransl[1] * dx)
                               + (p_itransl[2] * dy);
    p_centeredDetectorSample = p_itranss[0] + (p_itranss[1] * dx) + (p_itranss[2] * dy);
    p_centeredDetectorLine   = p_itransl[0] + (p_itransl[1] * dx) + (p_itransl[2] * dy);
    ComputeUncentered();
    return true;
  }

  /** Compute distorted focal plane coordinate from detector position

  /** Compute distorted focal plane coordinate from detector position (sampel,line)
   *
   * This method will compute both the distorted focal plane x/y and centered
   * detector position given a detector position
@@ -162,13 +166,12 @@ namespace Isis {
    p_detectorSample = sample;
    p_detectorLine = line;
    ComputeCentered();
    p_focalPlaneX = p_transx[0] + (p_transx[1] * p_centeredDetectorSample)
                    + (p_transx[2] * p_centeredDetectorLine) ;
    p_focalPlaneY = p_transy[0] + (p_transy[1] * p_centeredDetectorSample)
                    + (p_transy[2] * p_centeredDetectorLine) ;
    p_focalPlaneX = p_transx[0] + (p_transx[1] * p_centeredDetectorSample) + (p_transx[2] * p_centeredDetectorLine) ;
    p_focalPlaneY = p_transy[0] + (p_transy[1] * p_centeredDetectorSample) + (p_transy[2] * p_centeredDetectorLine) ;
    return true;
  }


  /** Return the focal plane x dependency variable
   *
   * This method returns the image variable (sample or line) on
@@ -209,7 +212,6 @@ namespace Isis {
  }



  /** Return the sign of the p_transy coefficient with the greatest magnitude
   *
   * This method returns a +1 or -1 based on the sign of the p_transy
@@ -231,36 +233,43 @@ namespace Isis {
    }
  }


  //! Return distorted focal plane x
  double CameraFocalPlaneMap::FocalPlaneX() const {
    return p_focalPlaneX;
  }


  //! Return distorted focal plane y
  double CameraFocalPlaneMap::FocalPlaneY() const {
    return p_focalPlaneY;
  }


  //! Return detector sample
  double CameraFocalPlaneMap::DetectorSample() const {
    return p_detectorSample;
  }


  //! Return detector line
  double CameraFocalPlaneMap::DetectorLine() const {
    return p_detectorLine;
  }


  //! Return centered detector sample
  double CameraFocalPlaneMap::CenteredDetectorSample() const {
    return p_centeredDetectorSample;
  }


  //! Return centered detector line
  double CameraFocalPlaneMap::CenteredDetectorLine() const {
    return p_centeredDetectorLine;
  }


  /** Set the detector origin
   *
   * This is used to set the origin of the detector.  Typically the middle
@@ -275,16 +284,19 @@ namespace Isis {
    p_detectorLineOrigin = line;
  }


  //! Return detector line origin
  double CameraFocalPlaneMap::DetectorLineOrigin() const {
    return p_detectorLineOrigin;
  }


  //! Return detector sample origin
  double CameraFocalPlaneMap::DetectorSampleOrigin() const {
    return p_detectorSampleOrigin;
  }


  /** Set the detector offset
   *
   * This is used to set the offset between the detector origin and
@@ -300,34 +312,46 @@ namespace Isis {
    p_detectorLineOffset = lineOffset;
  }


  //! Return detector line offset
  double CameraFocalPlaneMap::DetectorLineOffset() const {
    return p_detectorLineOffset;
  }


  //! Return detector sample offset
  double CameraFocalPlaneMap::DetectorSampleOffset() const {
    return p_detectorSampleOffset;
  }


  const double *CameraFocalPlaneMap::TransX() const{
    return p_transx;
  }


  const double *CameraFocalPlaneMap::TransY() const{
    return p_transy;
  }


  const double *CameraFocalPlaneMap::TransS() const{
    return p_itranss;
  }


  const double *CameraFocalPlaneMap::TransL() const{
    return p_itransl;
  }


  //! Convenience method to center detector origin (use when inheriting)
  void CameraFocalPlaneMap::ComputeCentered() {
    p_centeredDetectorSample = p_detectorSample - p_detectorSampleOrigin;
    p_centeredDetectorLine   = p_detectorLine   - p_detectorLineOrigin;
  }


  //! Convenience method to center detector origin (use when inheriting)
  void CameraFocalPlaneMap::ComputeUncentered() {
    p_detectorSample = p_centeredDetectorSample + p_detectorSampleOrigin;
+5 −4
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@
#include "iTime.h"

namespace Isis {

  /** Compute parent position from a detector coordinate
   *
   * This method will compute a parent sample given a
@@ -38,14 +39,14 @@ namespace Isis {
   *
   * @return conversion successful
   */
  bool LineScanCameraDetectorMap::SetDetector(const double sample,
      const double line) {
  bool LineScanCameraDetectorMap::SetDetector(const double sample, const double line) {
    if(!CameraDetectorMap::SetDetector(sample, line)) return false;
    double etDiff = p_camera->time().Et() - p_etStart;
    p_parentLine = etDiff / p_lineRate + 0.5;
    return true;
  }


  /** Compute detector position from a parent image coordinate
   *
   * This method will compute the detector position from the parent
@@ -57,8 +58,7 @@ namespace Isis {
   *
   * @return conversion successful
   */
  bool LineScanCameraDetectorMap::SetParent(const double sample,
      const double line) {
  bool LineScanCameraDetectorMap::SetParent(const double sample, const double line) {
    if(!CameraDetectorMap::SetParent(sample, line)) return false;
    p_detectorLine = p_camera->FocalPlaneMap()->DetectorLineOffset();
    double etLine = p_etStart + p_lineRate * (line - 0.5);
@@ -66,6 +66,7 @@ namespace Isis {
    return true;
  }


  //! Return the starting time at the top edge of the first line in the parent image
  double LineScanCameraDetectorMap::StartTime() const {
    return p_etStart;
+5 −2
Original line number Diff line number Diff line
@@ -49,6 +49,7 @@ namespace Isis {
   */
  class LineScanCameraDetectorMap : public CameraDetectorMap {
    public:

      /** Construct a detector map for line scan cameras
       *
       * @param parent    The parent camera model for the detector map
@@ -64,6 +65,7 @@ namespace Isis {
        p_lineRate = lineRate;
      }


      //! Destructor
      virtual ~LineScanCameraDetectorMap() {};

@@ -81,6 +83,7 @@ namespace Isis {
        p_etStart = etStart;
      };


      /** Reset the line rate
       *
       * Use this method to reset the time between lines.  Usually this
@@ -93,15 +96,15 @@ namespace Isis {
        p_lineRate = lineRate;
      };


      //! Return the time in seconds between scan lines
      double LineRate() const {
        return p_lineRate;
      };

      virtual bool SetParent(const double sample, const double line);

      virtual bool SetParent(const double sample, const double line);
      virtual bool SetDetector(const double sample, const double line);

      double StartTime() const;

    private:
+7 −2
Original line number Diff line number Diff line
@@ -59,13 +59,15 @@ bool ptXLessThan(const QList<double> l1, const QList<double> l2);
class LineOffsetFunctor : 
  public std::unary_function<double, double > {
  public:

    LineOffsetFunctor(Isis::Camera *camera, const Isis::SurfacePoint &surPt) {
      m_camera = camera;
      surfacePoint = surPt;
    }
    ~LineOffsetFunctor() {}


    ~LineOffsetFunctor() {}


    /** Compute the number of lines between the current line (i.e., the line imaged at the et as set
     *  in the camera model) and the line number where the argument et would hit the focal
@@ -107,7 +109,7 @@ class LineOffsetFunctor :


      // This was replaced with the code below to get Chandrayaan M3 to work.
      // SetUndistortedFocalPlane was failing a majority of the time, causing most SetGround call
      // SetUndistortedFocalPlane was failing a majority of the time, causing most SetGround calls
      // to fail. Even when it did succeed, it was producing non-continous return values.
        // Set the undistorted focal plane coordinates
//        if (!m_camera->DistortionMap()->SetUndistortedFocalPlane(ux, uy)) {
@@ -161,11 +163,14 @@ class LineOffsetFunctor :
 */
class SensorSurfacePointDistanceFunctor : 
  public std::unary_function<double, double > {

  public:
    SensorSurfacePointDistanceFunctor(Isis::Camera *camera, const Isis::SurfacePoint &surPt) {
      m_camera = camera;
      surfacePoint = surPt;
    }


    ~SensorSurfacePointDistanceFunctor() {}


Loading