OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimMatrixProperty.h
Go to the documentation of this file.
1 //*******************************************************************
2 //
3 // License: See top level LICENSE.txt file.
4 //
5 // Author: Garrett Potts (gpotts@imagelinks.com)
6 //
7 //*************************************************************************
8 // $Id: ossimMatrixProperty.h 17074 2010-04-14 18:49:11Z dburken $
9 #ifndef ossimMatrixProperty_HEADER
10 #define ossimMatrixProperty_HEADER
11 #include <vector>
13 
14 
16 {
17 public:
19  const std::vector<double>& values = std::vector<double>(),
20  int numberOfRows = 0,
21  int numberOfColumns = 0);
23 
24  virtual ~ossimMatrixProperty();
25 
26  virtual ossimObject* dup()const;
27  virtual const ossimProperty& assign(const ossimProperty& rhs);
28  virtual bool setValue(const ossimString& value);
29  virtual void valueToString(ossimString& valueResult)const;
30 
31  void resize(int numberOfRows,
32  int numberOfColumns);
33 
34  double& operator ()(int rowIdx,
35  int colIdx);
36 
37  const double& operator()(int rowIdx,
38  int colIdx)const;
39 
40  int getNumberOfRows()const;
41  int getNumberOfCols()const;
42 
43  void clearConstraints();
44 
50  void setColConstraints(int minNumberOfColumns,
51  int maxNumberOfColumns);
52 
58  void setRowConstraints(int minNumberOfRows,
59  int maxNumberOfRows);
60 
61  void getColConstraints(int& minNumberOfColumns,
62  int& maxNumberOfColumns) const;
63 
64  void getRowConstraints(int& minNumberOfRows,
65  int& maxNumberOfRows) const;
66 
67  void normalize();
68  void zero();
69 
70 protected:
71  std::vector< std::vector<double> > theValueArray;
76 
77  double density()const;
79 };
80 
81 #endif
#define OSSIMDLLEXPORT
virtual const ossimProperty & assign(const ossimProperty &rhs)
std::vector< std::vector< double > > theValueArray
virtual ossimString valueToString() const
#define TYPE_DATA
Definition: ossimRtti.h:339
virtual ossimObject * dup() const
Definition: ossimObject.cpp:29
virtual bool setValue(const ossimString &value)=0