OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
Public Member Functions | Public Attributes | List of all members
ossimFeatherMosaic::ossimFeatherInputInformation Class Reference

This is only visible by this class and will remain here unless we want to move it later. More...

#include <ossimFeatherMosaic.h>

Public Member Functions

 ossimFeatherInputInformation (const vector< ossimIpt > &validVertices=vector< ossimIpt >())
 
void setVertexList (const vector< ossimIpt > &validVertices)
 

Public Attributes

ossimDpt theCenter
 
ossimDpt theAxis1
 
ossimDpt theAxis2
 
double theAxis1Length
 
double theAxis2Length
 
std::vector< ossimIpttheValidVertices
 

Detailed Description

This is only visible by this class and will remain here unless we want to move it later.

Definition at line 39 of file ossimFeatherMosaic.h.

Constructor & Destructor Documentation

◆ ossimFeatherInputInformation()

ossimFeatherMosaic::ossimFeatherInputInformation::ossimFeatherInputInformation ( const vector< ossimIpt > &  validVertices = vector<ossimIpt>())

Definition at line 393 of file ossimFeatherMosaic.cpp.

References setVertexList().

394 {
395  setVertexList(validVertices);
396 }
void setVertexList(const vector< ossimIpt > &validVertices)

Member Function Documentation

◆ setVertexList()

void ossimFeatherMosaic::ossimFeatherInputInformation::setVertexList ( const vector< ossimIpt > &  validVertices)

Definition at line 399 of file ossimFeatherMosaic.cpp.

References ossimLine::intersectInfinite(), ossimDpt::x, and ossimDpt::y.

Referenced by ossimFeatherMosaic::initialize(), and ossimFeatherInputInformation().

400 {
401  const char* MODULE = "ossimFeatherMosaic::ossimFeatherInputInformation::setVertexList()";
402 
403  theValidVertices = validVertices;
404 
405  theCenter = ossimDpt(0,0);
406  theAxis1 = ossimDpt(1, 0);
407  theAxis2 = ossimDpt(0, 1);
408  theAxis1Length = 1;
409  theAxis2Length = 1;
410 
411  double xSum=0.0, ySum=0.0;
412  ossim_uint32 upperBound = (ossim_uint32)validVertices.size();
413  if(upperBound)
414  {
415  for(ossim_uint32 index = 0; index < upperBound; ++index)
416  {
417  xSum += validVertices[index].x;
418  ySum += validVertices[index].y;
419  }
420 
421  theCenter.x = xSum/upperBound;
422  theCenter.y = ySum/upperBound;
423 
424  // for now we just want a quick implementation of something
425  // and we know that we have 4 vertices for the bounding valid
426  // vertices.
427  //
428  if(upperBound == 4)
429  {
430  ossimDpt edgeDirection1 = validVertices[1] - validVertices[0];
431  ossimDpt edgeDirection2 = validVertices[2] - validVertices[1];
432 
433  theAxis1 = ossimDpt(-edgeDirection1.y, edgeDirection1.x);
434 
435  theAxis2 = ossimDpt(-edgeDirection2.y, edgeDirection2.x);
436 
439 
440  ossimLine line1(theCenter,
441  theCenter + theAxis1*2);
442  ossimLine line2(validVertices[1],
443  validVertices[0]);
444  ossimLine line3(theCenter,
445  theCenter + theAxis2*2);
446  ossimLine line4(validVertices[2],
447  validVertices[1]);
448 
449  ossimDpt intersectionPoint1 = line1.intersectInfinite(line2);
450  ossimDpt intersectionPoint2 = line3.intersectInfinite(line4);
451 
452 
453  theAxis1Length = ossim::round<int>((theCenter-intersectionPoint1).length());
454  theAxis2Length = ossim::round<int>((theCenter-intersectionPoint2).length());
455 
456  if(traceDebug())
457  {
458  CLOG << "theAxis1Length: " << theAxis1Length << endl
459  << "theAxis2Length: " << theAxis2Length << endl
460  << "center: " << theCenter << endl;
461  }
462  }
463  }
464 }
#define CLOG
Definition: ossimTrace.h:23
double y
Definition: ossimDpt.h:165
double length() const
Definition: ossimDpt.h:81
unsigned int ossim_uint32
double x
Definition: ossimDpt.h:164

Member Data Documentation

◆ theAxis1

ossimDpt ossimFeatherMosaic::ossimFeatherInputInformation::theAxis1

Definition at line 48 of file ossimFeatherMosaic.h.

Referenced by ossimFeatherMosaic::computeWeight(), and operator<<().

◆ theAxis1Length

double ossimFeatherMosaic::ossimFeatherInputInformation::theAxis1Length

Definition at line 50 of file ossimFeatherMosaic.h.

Referenced by ossimFeatherMosaic::computeWeight(), and operator<<().

◆ theAxis2

ossimDpt ossimFeatherMosaic::ossimFeatherInputInformation::theAxis2

Definition at line 49 of file ossimFeatherMosaic.h.

Referenced by ossimFeatherMosaic::computeWeight(), and operator<<().

◆ theAxis2Length

double ossimFeatherMosaic::ossimFeatherInputInformation::theAxis2Length

Definition at line 51 of file ossimFeatherMosaic.h.

Referenced by ossimFeatherMosaic::computeWeight(), and operator<<().

◆ theCenter

ossimDpt ossimFeatherMosaic::ossimFeatherInputInformation::theCenter

Definition at line 47 of file ossimFeatherMosaic.h.

Referenced by ossimFeatherMosaic::computeWeight(), and operator<<().

◆ theValidVertices

std::vector<ossimIpt> ossimFeatherMosaic::ossimFeatherInputInformation::theValidVertices

Definition at line 52 of file ossimFeatherMosaic.h.

Referenced by operator<<().


The documentation for this class was generated from the following files: