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

#include <ossimAtbMatchPoint.h>

Inheritance diagram for ossimAtbMatchPoint:
ossimReferenced

Public Member Functions

 ossimAtbMatchPoint ()
 
 ossimAtbMatchPoint (const ossimDpt &view_point, ossimGridRemapEngine *engine)
 
const ossimDptviewPoint () const
 
void addImage (ossimGridRemapSource *image_source)
 
bool assignRemapValues ()
 
void setKernelSize (int side_size)
 
void setGridRemapEngine (ossimGridRemapEngine *engine)
 
- Public Member Functions inherited from ossimReferenced
 ossimReferenced ()
 
 ossimReferenced (const ossimReferenced &)
 
ossimReferencedoperator= (const ossimReferenced &)
 
void ref () const
 increment the reference count by one, indicating that this object has another pointer which is referencing it. More...
 
void unref () const
 decrement the reference count by one, indicating that a pointer to this object is referencing it. More...
 
void unref_nodelete () const
 decrement the reference count by one, indicating that a pointer to this object is referencing it. More...
 
int referenceCount () const
 

Protected Member Functions

virtual ~ossimAtbMatchPoint ()
 
- Protected Member Functions inherited from ossimReferenced
virtual ~ossimReferenced ()
 

Protected Attributes

ossimDpt theViewPoint
 
vector< ossimAtbPointSource * > thePointSourceList
 
ossimGridRemapEnginetheGridRemapEngine
 

Detailed Description


CLASS: ossimAtbMatchPoint

Definition at line 34 of file ossimAtbMatchPoint.h.

Constructor & Destructor Documentation

◆ ossimAtbMatchPoint() [1/2]

ossimAtbMatchPoint::ossimAtbMatchPoint ( )
inline

Definition at line 37 of file ossimAtbMatchPoint.h.

38  : theGridRemapEngine(0) {}
ossimGridRemapEngine * theGridRemapEngine

◆ ossimAtbMatchPoint() [2/2]

ossimAtbMatchPoint::ossimAtbMatchPoint ( const ossimDpt view_point,
ossimGridRemapEngine engine 
)
inline

Definition at line 40 of file ossimAtbMatchPoint.h.

42  : theViewPoint(view_point), theGridRemapEngine(engine) {}
ossimGridRemapEngine * theGridRemapEngine

◆ ~ossimAtbMatchPoint()

ossimAtbMatchPoint::~ossimAtbMatchPoint ( )
protectedvirtual

Dumps the contents of the object to the stream in human readable format.

Definition at line 32 of file ossimAtbMatchPoint.cpp.

References thePointSourceList.

33 {
34  thePointSourceList.clear();
35 }
vector< ossimAtbPointSource * > thePointSourceList

Member Function Documentation

◆ addImage()

void ossimAtbMatchPoint::addImage ( ossimGridRemapSource image_source)

Adds a new contribution to the sample set.

Definition at line 43 of file ossimAtbMatchPoint.cpp.

44 {
45  static const char MODULE[] = "ossimAtbMatchPoint::addImage()";
46  if (traceExec()) CLOG << "entering..." << endl;
47 
48  //***
49  // Assure that this image contains the view point corresponding to this
50  // matchpoint:
51  //***
52  if (!remapper->getBoundingRect().pointWithin(theViewPoint))
53  {
54  if (traceExec()) CLOG << "returning..." << endl;
55  return;
56  }
57 
58  //***
59  // Instantiate a point source for this image at this view point and
60  // save it in the list:
61  //***
62  ossimAtbPointSource* point_source = new ossimAtbPointSource(remapper,
63  theViewPoint);
64  thePointSourceList.push_back(point_source);
65 
66  if (traceExec()) CLOG << "returning..." << endl;
67  return;
68 }
vector< ossimAtbPointSource * > thePointSourceList
#define CLOG
Definition: ossimTrace.h:23

◆ assignRemapValues()

bool ossimAtbMatchPoint::assignRemapValues ( )

The target parameter value computed given all contributions. Returns true if a valid quantity is returned.

Definition at line 79 of file ossimAtbMatchPoint.cpp.

80 {
81  static const char MODULE[] = "ossimAtbMatchPoint::assignRemapValues()";
82  if (traceExec()) CLOG << "entering..." << endl;
83 
84  //***
85  // Determine the number of contributors. We require minimum of two:
86  //***
87  ossim_uint32 num_contributors = (ossim_uint32)thePointSourceList.size();
88  if (num_contributors < 2)
89  return false;
90 
91  //***
92  // Hand off the computation of the target pixel to the ATB engine being
93  // used. The engine implements the methods for computing targets, as these
94  // will vary according to algorithm being used:
95  //***
97 
98  if (traceExec()) CLOG << "returning..." << endl;
99  return true;
100 }
virtual void assignRemapValues(std::vector< ossimAtbPointSource *> &sources)=0
vector< ossimAtbPointSource * > thePointSourceList
#define CLOG
Definition: ossimTrace.h:23
ossimGridRemapEngine * theGridRemapEngine
unsigned int ossim_uint32

◆ setGridRemapEngine()

void ossimAtbMatchPoint::setGridRemapEngine ( ossimGridRemapEngine engine)

Sets the ATB remap engine reference owned by the controller. This engine is the only object that understands how to compute remap parameters from pixel data. This permits easily modifying the ATB algorithm without the support classes such as this one.

Definition at line 128 of file ossimAtbMatchPoint.cpp.

129 {
130  static const char MODULE[] = "ossimAtbMatchPoint::setAtbRemapEngine";
131  if (traceExec()) CLOG << "entering..." << endl;
132 
133  theGridRemapEngine = engine;
134 
135  //***
136  // Need to communicate this change of engine to the point sources that use
137  // it to arrive at a "source value":
138  //***
139  vector<ossimAtbPointSource*>::iterator source = thePointSourceList.begin();
140  while (source != thePointSourceList.end())
141  {
142  (*source)->setGridRemapEngine(engine);
143  source++;
144  }
145 
146  if (traceExec()) CLOG << "returning..." << endl;
147  return;
148 }
vector< ossimAtbPointSource * > thePointSourceList
#define CLOG
Definition: ossimTrace.h:23
ossimGridRemapEngine * theGridRemapEngine

◆ setKernelSize()

void ossimAtbMatchPoint::setKernelSize ( int  side_size)

Hook to set the size of the kernel used by all point sources in computing their mean pixel value. The kernels will be resized to NxN.

Definition at line 110 of file ossimAtbMatchPoint.cpp.

111 {
112  static const char MODULE[] = "ossimAtbController::setKernelSize(N)";
113  if (traceExec()) CLOG << "entering..." << endl;
114 
115  vector<ossimAtbPointSource*>::iterator psi = thePointSourceList.begin();
116  while (psi != thePointSourceList.end())
117  (*psi)->setKernelSize(side_size);
118 
119  if (traceExec()) CLOG << "returning..." << endl;
120  return;
121 }
vector< ossimAtbPointSource * > thePointSourceList
#define CLOG
Definition: ossimTrace.h:23

◆ viewPoint()

const ossimDpt& ossimAtbMatchPoint::viewPoint ( ) const
inline

Returns the point in view coordinates associated with this object.

Definition at line 48 of file ossimAtbMatchPoint.h.

48 { return theViewPoint; }

Member Data Documentation

◆ theGridRemapEngine

ossimGridRemapEngine* ossimAtbMatchPoint::theGridRemapEngine
protected

Definition at line 87 of file ossimAtbMatchPoint.h.

◆ thePointSourceList

vector<ossimAtbPointSource*> ossimAtbMatchPoint::thePointSourceList
protected

Definition at line 86 of file ossimAtbMatchPoint.h.

Referenced by ~ossimAtbMatchPoint().

◆ theViewPoint

ossimDpt ossimAtbMatchPoint::theViewPoint
protected

Definition at line 85 of file ossimAtbMatchPoint.h.


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