OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimObservationSet.h
Go to the documentation of this file.
1 //----------------------------------------------------------------------------
2 //
3 // License: See top level LICENSE.txt file.
4 //
5 // Author: David Hicks
6 //
7 // Description: Storage class for observations.
8 //----------------------------------------------------------------------------
9 #ifndef ossimObservationSet_HEADER
10 #define ossimObservationSet_HEADER 1
11 
13 #include <ossim/base/ossimObject.h>
16 #include <ossim/base/ossimRefPtr.h>
17 #include <ossim/matrix/newmat.h>
18 #include <ossim/matrix/newmatio.h>
19 #include <iostream>
20 #include <vector>
21 
23 {
24 public:
26 
28 
29  inline ossim_uint32 numImages()const { return (ossim_uint32)theImageHandlers.size(); }
30  inline ossim_uint32 numObs()const { return (ossim_uint32)theObs.size(); }
31  inline ossim_uint32 numAdjPar()const { return (ossim_uint32)theNumAdjPar; }
32  inline ossim_uint32 numMeas()const { return (ossim_uint32)theNumMeas; }
33 
34  // observation accessor
35  inline ossimRefPtr<ossimPointObservation> observ(const int& i)const{ return theObs[i]; }
36 
37  // image accessor
38  ossimImageGeometry* getImageGeom(const int index);
39  void setImageGeom(const int index, ossimImageGeometry* geom);
40 
41  // image index accessor
42  inline int imIndex(const int& i)const { return theImageIndex[i]; }
43 
44  // adjustable parameter count accessor
45  inline int adjParCount(const int& i)const { return theNumAdjParams[i]; }
46 
47  // Image file access
48  inline ossimFilename imageFile(const int index)const { return theImageFiles[index]; }
49 
56  bool evaluate(NEWMAT::Matrix& measResiduals,
57  NEWMAT::Matrix& objPartials,
58  NEWMAT::Matrix& parPartials);
59 
63  bool addObservation(ossimRefPtr<ossimPointObservation> obs);
64 
68  std::ostream& print(std::ostream& os) const;
69 
70 protected:
74 
75  // member observations
76  std::vector< ossimRefPtr<ossimPointObservation> > theObs;
77 
78  // measurement -> image index
79  std::vector<int> theImageIndex;
80 
81  // image files
82  std::vector<ossimFilename> theImageFiles;
83 
84  // image adjustable parameter count
85  std::vector<int> theNumAdjParams;
86 
87  std::vector< ossimRefPtr<ossimImageHandler> > theImageHandlers;
88 
89  // groups (TODO in future integration of correlated parameters)
90  // Note: Currently, each image is assumed to be independent, which can result
91  // in redundant parameters. For example, images from a single flight line
92  // clearly share a common focal length and, most likely, a common position
93  // bias. Implementation of this enhancement will require a mechanism for
94  // defining inter-image parametric relationships.
95  //std::vector<????????*> theGroups;
96 };
97 
98 #endif // #ifndef ossimObservationSet_HEADER
int imIndex(const int &i) const
int adjParCount(const int &i) const
ossim_uint32 numImages() const
ossim_uint32 numObs() const
ossim_uint32 numMeas() const
std::vector< int > theNumAdjParams
std::vector< ossimRefPtr< ossimPointObservation > > theObs
std::vector< int > theImageIndex
virtual std::ostream & print(std::ostream &out) const
Generic print method.
unsigned int ossim_uint32
std::vector< ossimRefPtr< ossimImageHandler > > theImageHandlers
ossim_uint32 numAdjPar() const
Container class that holds both 2D transform and 3D projection information for an image Only one inst...
#define OSSIM_DLL
ossimFilename imageFile(const int index) const
std::basic_ostream< char > ostream
Base class for char output streams.
Definition: ossimIosFwd.h:23
ossimRefPtr< ossimPointObservation > observ(const int &i) const
std::vector< ossimFilename > theImageFiles