本文整理汇总了C++中Cube::Open方法的典型用法代码示例。如果您正苦于以下问题:C++ Cube::Open方法的具体用法?C++ Cube::Open怎么用?C++ Cube::Open使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Cube
的用法示例。
在下文中一共展示了Cube::Open方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
int main () {
Isis::Preference::Preferences(true);
try {
PvlGroup op("Operator");
op += PvlKeyword("Name","Gradient");
op += PvlKeyword("DeltaLine", 100);
op += PvlKeyword("DeltaSamp", 100);
op += PvlKeyword("Samples", 15);
op += PvlKeyword("Lines", 15);
op += PvlKeyword("MinimumInterest", 1);
PvlObject o("InterestOperator");
o.AddGroup(op);
Pvl pvl;
pvl.AddObject(o);
std::cout << pvl << std::endl;
InterestOperator *iop = InterestOperatorFactory::Create(pvl);
Cube c;
c.Open("$mgs/testData/ab102401.cub");
iop->Operate(c, 100, 350);
std::cout << "Sample: " << iop->CubeSample() << std::endl
<< "Line : " << iop->CubeLine() << std::endl
<< "Interest: " << iop->InterestAmount() << std::endl;
}
catch (iException &e) {
e.Report();
}
return 0;
}
示例2: IsisMain
void IsisMain() {
// We will be processing by line
ProcessByBrick p;
p.SetBrickSize(1,1,1);
p.SetOutputBrickSize(1,1,1);
UserInterface &ui = Application::GetUserInterface();
// Basic settings
p.SetInputCube("FROM");
p.SetOutputCube("TO");
Pvl pvl = Pvl(ui.GetFilename("PVL"));
cube.Open(ui.GetFilename("FROM"));
try {
// Get info from the operator group
// Set the pvlkeywords that need to be set to zero
PvlGroup &op = pvl.FindGroup("Operator",Pvl::Traverse);
boxcarSamples = op["Samples"];
boxcarLines = op["Lines"];
op["DeltaLine"]=0;
op["DeltaSamp"]=0;
op["MinimumInterest"]=0.0;
Application::Log(op);
} catch (iException &e) {
std::string msg = "Improper format for InterestOperator PVL ["+pvl.Filename()+"]";
throw iException::Message(iException::User,msg,_FILEINFO_);
}
iop = InterestOperatorFactory::Create(pvl);
// Start the processing
p.StartProcess(Operate);
p.EndProcess();
}
示例3: init
/**
* @brief File name based constructor for HiRISE image cleaner
*/
HiImageClean::HiImageClean(const std::string &fname) {
Cube cube;
cube.Open(fname);
_filename = fname;
_lines = _samples = 0;
_totalMaskNulled = _totalDarkNulled = 0;
init(cube);
}
示例4: IsisMain
void IsisMain() {
//Get user parameters
UserInterface &ui = Application::GetUserInterface();
Filename inFile = ui.GetFilename("FROM");
int numberOfLines = ui.GetInteger("NL");
int lineOverlap = ui.GetInteger("OVERLAP");
//Throws exception if user is dumb
if ( lineOverlap >= numberOfLines ) {
throw iException::Message( iException::User, "The Line Overlap (OVERLAP) must be less than the Number of Lines (LN).", _FILEINFO_ );
}
//Opens the cube
Cube cube;
cube.Open( inFile.Expanded() );
//Loops through, cropping as desired
int cropNum = 1;
int startLine = 1;
bool hasReachedEndOfCube = false;
while ( startLine <= cube.Lines() && not hasReachedEndOfCube ) {
//! Sets up the proper paramaters for running the crop program
string parameters = "FROM=" + inFile.Expanded() +
" TO=" + inFile.Path() + "/" + inFile.Basename() + ".segment" + iString(cropNum) + ".cub"
+ " LINE=" + iString(startLine) + " NLINES=";
if ( startLine + numberOfLines > cube.Lines() ) {
parameters += iString( cube.Lines() - ( startLine - 1 ) );
hasReachedEndOfCube = true;
}
else {
parameters += iString(numberOfLines);
}
Isis::iApp ->Exec("crop",parameters);
//The starting line for next crop
startLine = 1 + cropNum * ( numberOfLines - lineOverlap );
cropNum++;
}
}
示例5: load
/**
* @brief Loads the contents of a BLOB from a cube file
*
* Provides the I/O interface for ISIS cube files.
*
* @param [in] filename (string&) Name of ISIS cube file to read
*/
void Blobber::load(const std::string &filename) {
Cube cube;
cube.Open(filename);
load(cube);
return;
}
示例6: main
//.........这里部分代码省略.........
cout << "nearest neighbor: " << chip.GetReadInterpolator() << endl;
chip.SetReadInterpolator(Isis::Interpolator::BiLinearType);
cout << "bilinear: " << chip.GetReadInterpolator() << endl;
chip.SetReadInterpolator(Isis::Interpolator::CubicConvolutionType);
cout << "cubic convolution: " << chip.GetReadInterpolator() << endl;
cout << endl;
cout << endl;
cout << "Generate Errors:" << endl;
Cube junkCube2;
junkCube2.open("$base/testData/f319b18_ideal.cub");
// 4 by 4 chip at samle 1000 line 500
matchChip.TackCube(1, 1);
matchChip.Load(junkCube2);
cout << "Try to set interpolator to type 0 (Interpolator::None):" << endl;
try {
chip.SetReadInterpolator(Isis::Interpolator::None);
}
catch(IException &e) {
ReportError(e.toString());
}
cout << "Try to set interpolator to type 3 (enum value not assigned):" << endl;
try {
chip.SetReadInterpolator((Isis::Interpolator::interpType) 3);
}
catch(IException &e) {
ReportError(e.toString());
}
cout << "Try to set chip size with input parameter equal to 0:" << endl;
try {
newChip.SetSize(0, 1);
}
catch(IException &e) {
ReportError(e.toString());
}
cout << "Try to load a cube that is not camera or map projection:" << endl;
try {
newChip.Load(junk, matchChip, junkCube);
}
catch(IException &e) {
ReportError(e.toString());
}
cout << "Try to load a cube with a match cube that is not camera or map projection:" << endl;
try {
newChip.Load(junkCube, matchChip, junk);
}
catch(IException &e) {
ReportError(e.toString());
}
cout << "Try to load a cube with match chip and cube that can not find at least 3 points for Affine Transformation:" << endl;
try {
newChip.Load(junkCube, matchChip, junkCube2);
}
catch(IException &e) {
ReportError(e.toString());
}
cout << "Try to set valid range with larger number passed in as first parameter:" << endl;
try {
newChip.SetValidRange(4, 3);
}
catch(IException &e) {
ReportError(e.toString());
}
cout << "Try to extract a sub-chip with samples or lines greater than original chip:" << endl;
try {
newChip.Extract(2, 5, 1, 1);
}
catch(IException &e) {
ReportError(e.toString());
}
junk.close(true);// the "true" flag removes junk.cub from the /tmp/ directory
junkCube.close(); // these cubes are kept in test data area, do not delete
junkCube2.close();
#if 0
try {
junk.Open("/work2/janderso/moc/ab102401.lev1.cub");
chip.TackCube(453.0, 567.0);
chip.Load(junk);
Cube junk2;
junk2.Open("/work2/janderso/moc/ab102402.lev0.cub");
Chip chip2(75, 70);
chip2.TackCube(166.0, 567.0);
chip2.Load(junk2, chip);
chip.Write("junk3.cub");
chip2.Write("junk4.cub");
}
catch(IException &e) {
e.print();
}
#endif
return 0;
}
示例7: IsisMain
void IsisMain() {
Process p;
// Get the list of names of input CCD cubes to stitch together
FileList flist;
UserInterface &ui = Application::GetUserInterface();
flist.Read(ui.GetFilename("FROMLIST"));
if (flist.size() < 1) {
string msg = "The list file[" + ui.GetFilename("FROMLIST") +
" does not contain any filenames";
throw iException::Message(iException::User,msg,_FILEINFO_);
}
string projection("Equirectangular");
if(ui.WasEntered("MAP")) {
Pvl mapfile(ui.GetFilename("MAP"));
projection = (string) mapfile.FindGroup("Mapping")["ProjectionName"];
}
if(ui.WasEntered("PROJECTION")) {
projection = ui.GetString("PROJECTION");
}
// Gather other user inputs to projection
string lattype = ui.GetString("LATTYPE");
string londir = ui.GetString("LONDIR");
string londom = ui.GetString("LONDOM");
int digits = ui.GetInteger("PRECISION");
// Fix them for mapping group
lattype = (lattype == "PLANETOCENTRIC") ? "Planetocentric" : "Planetographic";
londir = (londir == "POSITIVEEAST") ? "PositiveEast" : "PositiveWest";
Progress prog;
prog.SetMaximumSteps(flist.size());
prog.CheckStatus();
Statistics scaleStat;
Statistics longitudeStat;
Statistics latitudeStat;
Statistics equiRadStat;
Statistics poleRadStat;
PvlObject fileset("FileSet");
// Save major equitorial and polar radii for last occuring
double eqRad;
double eq2Rad;
double poleRad;
string target("Unknown");
for (unsigned int i = 0 ; i < flist.size() ; i++) {
// Set the input image, get the camera model, and a basic mapping
// group
Cube cube;
cube.Open(flist[i]);
int lines = cube.Lines();
int samples = cube.Samples();
PvlObject fmap("File");
fmap += PvlKeyword("Name",flist[i]);
fmap += PvlKeyword("Lines", lines);
fmap += PvlKeyword("Samples", samples);
Camera *cam = cube.Camera();
Pvl mapping;
cam->BasicMapping(mapping);
PvlGroup &mapgrp = mapping.FindGroup("Mapping");
mapgrp.AddKeyword(PvlKeyword("ProjectionName",projection),Pvl::Replace);
mapgrp.AddKeyword(PvlKeyword("LatitudeType",lattype),Pvl::Replace);
mapgrp.AddKeyword(PvlKeyword("LongitudeDirection",londir),Pvl::Replace);
mapgrp.AddKeyword(PvlKeyword("LongitudeDomain",londom),Pvl::Replace);
// Get the radii
double radii[3];
cam->Radii(radii);
eqRad = radii[0] * 1000.0;
eq2Rad = radii[1] * 1000.0;
poleRad = radii[2] * 1000.0;
target = cam->Target();
equiRadStat.AddData(&eqRad, 1);
poleRadStat.AddData(&poleRad, 1);
// Get resolution
double lowres = cam->LowestImageResolution();
double hires = cam->HighestImageResolution();
scaleStat.AddData(&lowres, 1);
scaleStat.AddData(&hires, 1);
double pixres = (lowres+hires)/2.0;
double scale = Scale(pixres, poleRad, eqRad);
mapgrp.AddKeyword(PvlKeyword("PixelResolution",pixres),Pvl::Replace);
mapgrp.AddKeyword(PvlKeyword("Scale",scale,"pixels/degree"),Pvl::Replace);
mapgrp += PvlKeyword("MinPixelResolution",lowres,"meters");
mapgrp += PvlKeyword("MaxPixelResolution",hires,"meters");
// Get the universal ground range
//.........这里部分代码省略.........
示例8: IsisMain
/**
* This is the main method. Makeflat runs in three steps:
*
* 1) Calculate statistics
* - For all cameras, this checks for one band and matching
* sample counts.
* - For framing cameras, this checks the standard deviation of
* the images and records the averages of each image
* - For push frame cameras, this calls CheckFramelets for each
* image.
*
* 2) Create the temporary file, collect more detailed statistics
* - For all cameras, this generates the temporary file and calculates
* the final exclusion list
* - For framing/push frame cameras, the temporary file is
* 2 bands, where the first is a sum of DNs from each image/framelet
* and the second band is a count of valid DNs that went into each sum
*
* 3) Create the final flat field file
* - For all cameras, this processes the temporary file to create the final flat
* field file.
*/
void IsisMain() {
// Initialize variables
ResetGlobals();
UserInterface &ui = Application::GetUserInterface();
maxStdev = ui.GetDouble("STDEVTOL");
if(ui.GetString("IMAGETYPE") == "FRAMING") {
cameraType = Framing;
// framing cameras need to figure this out automatically
// during step 1
numFrameLines = -1;
}
else if(ui.GetString("IMAGETYPE") == "LINESCAN") {
cameraType = LineScan;
numFrameLines = ui.GetInteger("NUMLINES");
}
else {
cameraType = PushFrame;
numFrameLines = ui.GetInteger("FRAMELETHEIGHT");
}
FileList inList(ui.GetFilename("FROMLIST"));
Progress progress;
tempFileLength = 0;
numOutputSamples = 0;
/**
* Line scan progress is based on the input list, whereas
* the other cameras take much longer and are based on the
* images themselves. Prepare the progress if we're doing
* line scan.
*/
if(cameraType == LineScan) {
progress.SetText("Calculating Number of Image Lines");
progress.SetMaximumSteps(inList.size());
progress.CheckStatus();
}
/**
* For a push frame camera, the temp file is one framelet.
* Technically this is the same for the framing, but we
* don't know the height of a framelet yet.
*/
if(cameraType == PushFrame) {
tempFileLength = numFrameLines;
}
/**
* Start pass 1, use global currImage so that methods called
* know the image we're processing.
*/
for(currImage = 0; currImage < inList.size(); currImage++) {
/**
* Read the current cube into memory
*/
Cube tmp;
tmp.Open(Filename(inList[currImage]).Expanded());
/**
* If we haven't determined how many samples the output
* should have, we can do so now
*/
if(numOutputSamples == 0 && tmp.Bands() == 1) {
numOutputSamples = tmp.Samples();
}
/**
* Try and validate the image, quick tests first!
*
* (imageValid &= means imageValid = imageValid && ...)
*/
bool imageValid = true;
// Only single band images are acceptable
imageValid &= (tmp.Bands() == 1);
//.........这里部分代码省略.........
示例9: IsisMain
void IsisMain() {
//Create a process to create the input cubes
Process p;
//Create the input cubes, matching sample/lines
Cube *inCube = p.SetInputCube ("FROM");
Cube *latCube = p.SetInputCube("LATCUB", SpatialMatch);
Cube *lonCube = p.SetInputCube("LONCUB", SpatialMatch);
//A 1x1 brick to read in the latitude and longitude DN values from
//the specified cubes
Brick latBrick(1,1,1, latCube->PixelType());
Brick lonBrick(1,1,1, lonCube->PixelType());
UserInterface &ui = Application::GetUserInterface();
//Set the sample and line increments
int sinc = (int)(inCube->Samples() * 0.10);
if(ui.WasEntered("SINC")) {
sinc = ui.GetInteger("SINC");
}
int linc = (int)(inCube->Lines() * 0.10);
if(ui.WasEntered("LINC")) {
linc = ui.GetInteger("LINC");
}
//Set the degree of the polynomial to use in our functions
int degree = ui.GetInteger("DEGREE");
//We are using a polynomial with two variables
PolynomialBivariate sampFunct(degree);
PolynomialBivariate lineFunct(degree);
//We will be solving the function using the least squares method
LeastSquares sampSol(sampFunct);
LeastSquares lineSol(lineFunct);
//Setup the variables for solving the stereographic projection
//x = cos(latitude) * sin(longitude - lon_center)
//y = cos(lat_center) * sin(latitude) - sin(lat_center) * cos(latitude) * cos(longitude - lon_center)
//Get the center lat and long from the input cubes
double lat_center = latCube->Statistics()->Average() * PI/180.0;
double lon_center = lonCube->Statistics()->Average() * PI/180.0;
/**
* Loop through lines and samples projecting the latitude and longitude at those
* points to stereographic x and y and adding these points to the LeastSquares
* matrix.
*/
for(int i = 1; i <= inCube->Lines(); i+= linc) {
for(int j = 1; j <= inCube->Samples(); j+= sinc) {
latBrick.SetBasePosition(j, i, 1);
latCube->Read(latBrick);
if(IsSpecial(latBrick.at(0))) continue;
double lat = latBrick.at(0) * PI/180.0;
lonBrick.SetBasePosition(j, i, 1);
lonCube->Read(lonBrick);
if(IsSpecial(lonBrick.at(0))) continue;
double lon = lonBrick.at(0) * PI/180.0;
//Project lat and lon to x and y using a stereographic projection
double k = 2/(1 + sin(lat_center) * sin(lat) + cos(lat_center)*cos(lat)*cos(lon - lon_center));
double x = k * cos(lat) * sin(lon - lon_center);
double y = k * (cos(lat_center) * sin(lat)) - (sin(lat_center) * cos(lat) * cos(lon - lon_center));
//Add x and y to the least squares matrix
vector<double> data;
data.push_back(x);
data.push_back(y);
sampSol.AddKnown(data, j);
lineSol.AddKnown(data, i);
//If the sample increment goes past the last sample in the line, we want to
//always read the last sample..
if(j != inCube->Samples() && j + sinc > inCube->Samples()) {
j = inCube->Samples() - sinc;
}
}
//If the line increment goes past the last line in the cube, we want to
//always read the last line..
if(i != inCube->Lines() && i + linc > inCube->Lines()) {
i = inCube->Lines() - linc;
}
}
//Solve the least squares functions using QR Decomposition
sampSol.Solve(LeastSquares::QRD);
lineSol.Solve(LeastSquares::QRD);
//If the user wants to save the residuals to a file, create a file and write
//the column titles to it.
TextFile oFile;
if(ui.WasEntered("RESIDUALS")) {
oFile.Open(ui.GetFilename("RESIDUALS"), "overwrite");
oFile.PutLine("Sample,\tLine,\tX,\tY,\tSample Error,\tLine Error\n");
}
//Gather the statistics for the residuals from the least squares solutions
//.........这里部分代码省略.........
示例10: IsisMain
void IsisMain() {
UserInterface &ui = Application::GetUserInterface();
/*Processing steps
1. Open and read the jitter table, convert the pixel offsets to angles,
and create the polynomials (solve for the coefficients) to use to do
the high pass filter putting the results into a rotation matrix in the jitter class.
2. Apply the jitter correction in the LineScanCameraRotation object of the master cube.
3. Loop through FROMLIST correcting the pointing and writing out the
updated camera pointing from the master cube
*/
int degree = ui.GetInteger("DEGREE");
// Get the input file list to make sure it is not empty and the master cube is included
FileList list;
list.Read(ui.GetFilename("FROMLIST"));
if (list.size() < 1) {
string msg = "The input list file [" + ui.GetFilename("FROMLIST") + "is empty";
throw iException::Message(iException::User,msg,_FILEINFO_);
}
int ifile = 0;
// Make sure the master file is included in the input file list
while (ifile < (int) list.size() && Filename(list[ifile]).Expanded() != Filename(ui.GetFilename("MASTER")).Expanded()) {
ifile++;
}
if (ifile >= (int) list.size()) {
string msg = "The master file, [" + Filename(ui.GetFilename("MASTER")).Expanded() + " is not included in " +
"the input list file " + ui.GetFilename("FROMLIST") + "]";
throw iException::Message(iException::User,msg,_FILEINFO_);
}
bool step2 = false;
PvlGroup gp("AppjitResults");
//Step 1: Create the jitter rotation
try {
// Open the master cube
Cube cube;
cube.Open(ui.GetFilename("MASTER"),"rw");
//check for existing polygon, if exists delete it
if (cube.Label()->HasObject("Polygon")){
cube.Label()->DeleteObject("Polygon");
}
// Get the camera
Camera *cam = cube.Camera();
if (cam->DetectorMap()->LineRate() == 0.0) {
string msg = "[" + ui.GetFilename("MASTER") + "] is not a line scan camera image";
throw iException::Message(Isis::iException::User,msg,_FILEINFO_);
}
// Create the master rotation to be corrected
int frameCode = cam->InstrumentRotation()->Frame();
cam->SetImage(int(cube.Samples()/2), int(cube.Lines()/2) );
double tol = cam->PixelResolution();
if (tol < 0.) {
// Alternative calculation of .01*ground resolution of a pixel
tol = cam->PixelPitch()*cam->SpacecraftAltitude()*1000./cam->FocalLength()/100.;
}
LineScanCameraRotation crot(frameCode, *(cube.Label()), cam->InstrumentRotation()->GetFullCacheTime(), tol );
crot.SetPolynomialDegree(ui.GetInteger("DEGREE"));
crot.SetAxes(1, 2, 3);
if (ui.WasEntered("PITCHRATE")) crot.ResetPitchRate(ui.GetDouble("PITCHRATE"));
if (ui.WasEntered("YAW")) crot.ResetYaw(ui.GetDouble("YAW"));
crot.SetPolynomial();
double baseTime = crot.GetBaseTime();
double timeScale = crot.GetTimeScale();
double fl = cam->FocalLength();
double pixpitch = cam->PixelPitch();
std::vector<double> cacheTime = cam->InstrumentRotation()->GetFullCacheTime();
// Get the jitter in pixels, compute jitter angles, and fit a polynomial to each angle
PixelOffset jitter(ui.GetFilename("JITTERFILE"), fl, pixpitch, baseTime, timeScale, degree);
jitter.LoadAngles(cacheTime);
jitter.SetPolynomial();
// Set the jitter and apply to the instrument rotation
crot.SetJitter( &jitter );
crot.ReloadCache();
// Pull out the pointing cache as a table and write it
Table cmatrix = crot.Cache("InstrumentPointing");
cmatrix.Label().AddComment("Corrected using appjit and" + ui.GetFilename("JITTERFILE"));
cube.Write(cmatrix);
// Write out the instrument position table
Isis::PvlGroup kernels = cube.Label()->FindGroup("Kernels",Isis::Pvl::Traverse);
// Write out the "Table" label to the tabled kernels in the kernels group
kernels["InstrumentPointing"] = "Table";
// kernels["InstrumentPosition"] = "Table";
cube.PutGroup(kernels);
cube.Close();
gp += PvlKeyword("StatusMaster",ui.GetFilename("MASTER") + ": camera pointing updated");
//.........这里部分代码省略.........
示例11: IsisMain
void IsisMain() {
// Get the list of cubes to mosaic
UserInterface &ui = Application::GetUserInterface();
FileList flist(ui.GetFilename("FROMLIST"));
vector<Cube *> clist;
try {
if (flist.size() < 1) {
string msg = "the list file [" +ui.GetFilename("FROMLIST") +
"does not contain any data";
throw iException::Message(iException::User,msg,_FILEINFO_);
}
// open all the cube and place in vector clist
for (int i=0; i<(int)flist.size(); i++) {
Cube *c = new Cube();
clist.push_back(c);
c->Open(flist[i]);
}
// run the compair function here. This will conpair the
// labels of the first cube to the labels of each following cube.
PvlKeyword sourceProductId("SourceProductId");
string ProdId;
for (int i=0; i<(int)clist.size(); i++) {
Pvl *pmatch = clist[0]->Label();
Pvl *pcomp = clist[i]->Label();
CompareLabels(*pmatch, *pcomp);
PvlGroup g = pcomp->FindGroup("Instrument",Pvl::Traverse);
if (g.HasKeyword("StitchedProductIds")) {
PvlKeyword k = g["StitchedProductIds"];
for (int j=0; j<(int)k.Size(); j++) {
sourceProductId += g["stitchedProductIds"][j];
}
}
ProdId = (string)pmatch->FindGroup("Archive",Pvl::Traverse)["ObservationId"];
iString bandname = (string)pmatch->FindGroup("BandBin",Pvl::Traverse)["Name"];
bandname = bandname.UpCase();
ProdId = ProdId + "_" + bandname;
}
bool runXY=true;
//calculate the min and max lon
double minLat = DBL_MAX;
double maxLat = -DBL_MAX;
double minLon = DBL_MAX;
double maxLon = -DBL_MAX;
double avgLat;
double avgLon;
for (int i=0; i<(int)clist.size(); i++) {
Projection *proj = clist[i]->Projection();
if (proj->MinimumLatitude() < minLat) minLat = proj->MinimumLatitude();
if (proj->MaximumLatitude() > maxLat) maxLat = proj->MaximumLatitude();
if (proj->MinimumLongitude() < minLon) minLon = proj->MinimumLongitude();
if (proj->MaximumLongitude() > maxLon) maxLon = proj->MaximumLongitude();
}
avgLat = (minLat + maxLat) / 2;
avgLon = (minLon + maxLon) / 2;
Projection *proj = clist[0]->Projection();
proj->SetGround(avgLat,avgLon);
avgLat = proj->UniversalLatitude();
avgLon = proj->UniversalLongitude();
// Use camera class to get Inc., emi., phase, and other values
double Cemiss;
double Cphase;
double Cincid;
double ClocalSolTime;
double CsolarLong;
double CsunAzimuth;
double CnorthAzimuth;
for (int i=0; i<(int)clist.size(); i++) {
Camera *cam = clist[i]->Camera();
if (cam->SetUniversalGround(avgLat,avgLon)) {
Cemiss = cam->EmissionAngle();
Cphase = cam->PhaseAngle();
Cincid = cam->IncidenceAngle();
ClocalSolTime = cam->LocalSolarTime();
CsolarLong = cam->SolarLongitude();
CsunAzimuth = cam->SunAzimuth();
CnorthAzimuth = cam->NorthAzimuth();
runXY = false;
break;
}
}
//The code within the if runXY was added in 10/07 to find an intersect with
//pole images that would fail when using projection set universal ground.
// This is run if no intersect is found when using lat and lon in
// projection space.
if (runXY) {
double startX = DBL_MAX;
double endX = DBL_MIN;
double startY = DBL_MAX;
//.........这里部分代码省略.........