Commit 8680d274 authored by Ian Humphrey's avatar Ian Humphrey
Browse files

Updated from v006 (v006 was updated from trunk).

git-svn-id: http://subversion.wr.usgs.gov/repos/prog/isis3/branches/ipce@6736 41f8697f-d340-4b68-9986-7bafba869bb8
parents 2e46d3e9 08f12945
Loading
Loading
Loading
Loading
+30 −25
Original line number Diff line number Diff line
#define GUIHELPERS

#include "Isis.h"

#include "cam2map.h"
#include "Camera.h"
#include "TProjection.h"
#include "ProjectionFactory.h"
#include "ProcessRubberSheet.h"
#include "IException.h"
#include "cam2map.h"
#include "Pvl.h"
#include "IString.h"
#include "ProcessRubberSheet.h"
#include "ProjectionFactory.h"
#include "PushFrameCameraDetectorMap.h"
#include "Pvl.h"
#include "Target.h"
#include "TProjection.h"

using namespace std;
using namespace Isis;

void PrintMap();
void LoadMapRes();
void LoadCameraRes();
void LoadMapRange();
void LoadCameraRange();
void printMap();
void loadMapRes();
void loadCameraRes();
void loadMapRange();
void loadCameraRange();

map <QString, void *> GuiHelpers() {
  map <QString, void *> helper;
  helper ["PrintMap"] = (void *) PrintMap;
  helper ["LoadMapRes"] = (void *) LoadMapRes;
  helper ["LoadCameraRes"] = (void *) LoadCameraRes;
  helper ["LoadMapRange"] = (void *) LoadMapRange;
  helper ["LoadCameraRange"] = (void *) LoadCameraRange;
  helper ["PrintMap"] = (void *) printMap;
  helper ["LoadMapRes"] = (void *) loadMapRes;
  helper ["LoadCameraRes"] = (void *) loadCameraRes;
  helper ["LoadMapRange"] = (void *) loadMapRange;
  helper ["LoadCameraRange"] = (void *) loadCameraRange;
  return helper;
}


// Global variables
void BandChange(const int band);
void bandChange(const int band);
Cube *icube;
Camera *incam;

@@ -266,7 +267,7 @@ void IsisMain() {

  // See if we need to deal with band dependent camera models
  if (!incam->IsBandIndependent()) {
    p.BandChange(BandChange);
    p.BandChange(bandChange);
  }

  //  See if center of input image projects.  If it does, force tile
@@ -301,8 +302,12 @@ void IsisMain() {
  // Does the user want to define how it is done?
  if (ui.GetString("WARPALGORITHM") == "FORWARDPATCH") {
    transform = new cam2mapForward(icube->sampleCount(),
                                   icube->lineCount(), incam, samples,lines,
                                   outmap, trim);
                                   icube->lineCount(), 
                                   incam, 
                                   samples,
                                   lines,
                                   outmap, 
                                   trim);

    int patchSize = ui.GetInteger("PATCHSIZE");
    if (patchSize <= 1) {
@@ -542,12 +547,12 @@ int cam2mapReverse::OutputLines() const {
  return p_outputLines;
}

void BandChange(const int band) {
void bandChange(const int band) {
  incam->SetBand(band);
}

// Helper function to print out mapfile to session log
void PrintMap() {
void printMap() {
  UserInterface &ui = Application::GetUserInterface();

  // Get mapping group from map file
@@ -560,7 +565,7 @@ void PrintMap() {
}

// Helper function to get mapping resolution.
void LoadMapRes() {
void loadMapRes() {
  UserInterface &ui = Application::GetUserInterface();

  // Get mapping group from map file
@@ -588,7 +593,7 @@ void LoadMapRes() {
}

//Helper function to get camera resolution.
void LoadCameraRes() {
void loadCameraRes() {
  UserInterface &ui = Application::GetUserInterface();
  QString file = ui.GetFileName("FROM");

@@ -608,7 +613,7 @@ void LoadCameraRes() {
}

//Helper function to get ground range from map file.
void LoadMapRange() {
void loadMapRange() {
  UserInterface &ui = Application::GetUserInterface();

  // Get map file
@@ -651,7 +656,7 @@ void LoadMapRange() {
}

//Helper function to load camera range.
void LoadCameraRange() {
void loadCameraRange() {
  UserInterface &ui = Application::GetUserInterface();
  QString file = ui.GetFileName("FROM");

+1 −0
Original line number Diff line number Diff line
#ifndef cam2map_h
#define cam2map_h

#include "TProjection.h"
#include "Transform.h"

using namespace Isis;
+4 −0
Original line number Diff line number Diff line
@@ -275,6 +275,10 @@
        Updated examples #1-4 GUI illustrations, and clarified some of the "Description" paragraphs.
        Fixes #2389.
     </change>
     <change name="Jac Shinaman" date="2016-02-09">
        Brought code closer to ISIS coding standards. Added test to read NAIF body frame info from labels.
        References #3934
     </change>
  </history>

  <oldName>
+2 −1
Original line number Diff line number Diff line
@@ -10,4 +10,5 @@ commands:
	           to=$(OUTPUT)/cam2mapTruth.cub \
	           map=$(INPUT)/test.map \
	           lonseam=continue \
	  pixres=map > /dev/null;
	           pixres=map \
	           >& /dev/null;
+6 −2
Original line number Diff line number Diff line
@@ -17,6 +17,10 @@ commands:
	$(APPNAME) from= $(INPUT)/ab102401.cub \
	           to=$(OUTPUT)/cam2mapCheckRange.cub \
	           defaultrange=camera \
	  MINLAT=15.0 MAXLAT=20.0 MINLON=225.0 MAXLON=230.0 \
	           MINLAT=15.0 \
	           MAXLAT=20.0 \
	           MINLON=225.0 \
	           MAXLON=230.0 \
	           pixres=mpp \
	  resolution=1000 > /dev/null;
	           resolution=1000 \
	           >& /dev/null;
Loading