Exemplo n.º 1
0
void oneInput(Isis::Buffer &b) {
  if((b.Line() == 1) && (b.Sample() == 1)) {
    cout << "Testing one input cube ... " << endl;
    cout << "Buffer Samples:  " << b.size() << endl;
    cout << "Buffer Lines:    " << b.LineDimension() << endl;
    cout << "Buffer Bands:    " << b.BandDimension() << endl;
    cout << endl;
  }
  cout << "Sample:  " << b.Sample()
       << "  Line:  " << b.Line()
       << "  Band:  " << b.Band() << endl;
}
Exemplo n.º 2
0
void oneInAndOut (Isis::Buffer &ib, double &ob) {
	static bool firstTime = true;
  if (firstTime) {
    firstTime = false;
    cout << endl;
    cout << "Testing one input and output cube ... " << endl;
    cout << "Boxcar Samples:  " << ib.SampleDimension() << endl;
    cout << "Boxcar Lines:    " << ib.LineDimension() << endl;
    cout << "Boxcar Bands:    " << ib.BandDimension() << endl;
    cout << endl;
  }
  
  if (ib.Sample() < 1) {
    cout << "Top Left Sample:  " << ib.Sample() 
         << ", Top Left Line:  " << ib.Line() 
         << ", Top Left Band:  " << ib.Band() << endl;
  }
}
Exemplo n.º 3
0
void oneInAndOut(Isis::Buffer &ib, Isis::Buffer &ob) {
  if((ib.Line() == 1) && (ib.Sample() == 1)) {
    cout << endl;
    cout << "Testing one input and output cube ... " << endl;
    cout << "Buffer Samples:  " << ib.size() << endl;
    cout << "Buffer Lines:    " << ib.LineDimension() << endl;
    cout << "Buffer Bands:    " << ib.BandDimension() << endl;
    cout << endl;
  }
  cout << "Sample:  " << ib.Sample()
       << "  Line:  " << ib.Line()
       << "  Band:  " << ib.Band() << endl;

  if((ib.Sample() != ob.Sample()) ||
      (ib.Line() != ob.Line()) ||
      (ib.Band() != ob.Band())) {
    cout << "Bogus error #1" << endl;
  }
}
Exemplo n.º 4
0
// Call Operate once per pixel to get the interest for every pixel in the input cube.
void Operate(Isis::Buffer &in, Isis::Buffer &out) {
  try {
    int sample = in.Sample();
    int line = in.Line();

    iop->Operate(cube, sample, line);


    out[0] = iop->InterestAmount();

  } catch (iException &e) {
    e.Report();
  }
}
Exemplo n.º 5
0
void twoInAndOut (vector<Isis::Buffer *> &ib, vector<Isis::Buffer *> &ob) {
  static bool firstTime = true;
  if (firstTime) {
    firstTime = false;
    cout << "Testing two input and output cubes ... " << endl;
    cout << "Number of input cubes:   " << ib.size() << endl;
    cout << "Number of output cubes:  " << ob.size() << endl;
    cout << endl;
  }

  Isis::Buffer *inone = ib[0];
  Isis::Buffer *intwo = ib[1];
  Isis::Buffer *outone = ob[0];
  Isis::Buffer *outtwo = ob[1];
  
  cout << "Sample:  " << inone->Sample() << ":" << intwo->Sample() 
       << "  Line:  " << inone->Line() << ":" << intwo->Line()
       << "  Band:  " << inone->Band() << ":" << intwo->Band() << endl;

  if ((inone->Sample() != intwo->Sample()) || 
      (inone->Line() != intwo->Line())) {
    cout << "Bogus error #1" << endl;
  }

  if ((inone->Sample() != outone->Sample()) || 
      (inone->Line() != outone->Line()) ||
      (inone->Band() != outone->Band())) {
    cout << "Bogus error #2" << endl;
  }
  
  if ((outone->Sample() != outtwo->Sample()) || 
      (outone->Line() != outtwo->Line()) ||
      (outone->Band() != outtwo->Band())) {
    cout << "Bogus error #3" << endl;
  }
}