OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimBandAverageFilter.h
Go to the documentation of this file.
1 //*******************************************************************
2 // Copyright (C) 2000 ImageLinks Inc.
3 //
4 // License: MIT
5 //
6 // See LICENSE.txt file in the top level directory for more details.
7 //
8 // Author: Garrett Potts
9 //
10 //*************************************************************************
11 // $Id: ossimBandAverageFilter.h 15766 2009-10-20 12:37:09Z gpotts $
12 #ifndef ossimBandAverageFilter_HEADER
13 #define ossimBandAverageFilter_HEADER
14 #include <vector>
16 
25 {
26 public:
29  const std::vector<double>& weights);
30 
31  virtual ~ossimBandAverageFilter();
32 
39  virtual ossim_uint32 getNumberOfOutputBands()const;
40 
48  ossim_uint32 resLevel=0);
49 
55  virtual double getNullPixelValue(ossim_uint32 band=0)const;
56 
61  virtual double getMinPixelValue(ossim_uint32 band=0)const;
62 
67  virtual double getMaxPixelValue(ossim_uint32 band=0)const;
68 
72  double getWeight(ossim_uint32 band)const;
73 
78  void setWeight(ossim_uint32 band, double weight);
79 
83  virtual void initialize();
84 
88  virtual bool loadState(const ossimKeywordlist& kwl,
89  const char* prefix=0);
93  virtual bool saveState(ossimKeywordlist& kwl,
94  const char* prefix=0)const;
95 
96 protected:
98  std::vector<double> theWeights;
99 
100  void checkWeights();
101 
102  template<class T> void averageInput(
103  T dummyVariable, // used only for template type, value ignored
104  ossimRefPtr<ossimImageData> inputDataObject);
105 
106 // for Runtime Type Info (RTTI)
107 TYPE_DATA
108 };
109 
110 #endif
#define OSSIMDLLEXPORT
ossimRefPtr< ossimImageData > theTile
This filter outputs a single band that is the weighted average of all the input bands retrieved from ...
Represents serializable keyword/value map.
virtual ossim_uint32 getNumberOfOutputBands() const
Returns the number of bands in a tile returned from this TileSource.
virtual double getMinPixelValue(ossim_uint32 band=0) const
Returns the min pixel of the band.
#define TYPE_DATA
Definition: ossimRtti.h:339
unsigned int ossim_uint32
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=0)
Method to the load (recreate) the state of an object from a keyword list.
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=0) const
Method to save the state of an object to a keyword list.
virtual double getMaxPixelValue(ossim_uint32 band=0) const
Returns the max pixel of the band.
std::vector< double > theWeights
virtual double getNullPixelValue(ossim_uint32 band=0) const
Each band has a null pixel associated with it.
virtual ossimRefPtr< ossimImageData > getTile(const ossimIpt &origin, ossim_uint32 resLevel=0)