OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimBandClipFilter.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: ossimBandClipFilter.h 15766 2009-10-20 12:37:09Z gpotts $
12 #ifndef ossimBandClipFilter_HEADER
13 #define ossimBandClipFilter_HEADER
14 #include <vector>
15 using namespace std;
16 
18 
20 {
21 public:
27  {
28  ossimBandClipType_NONE = 0,
29  ossimBandClipType_CLIP = 1,
30  ossimBandClipType_CLAMP = 2,
31  ossimBandClipType_LINEAR_STRETCH = 3,
32  ossimBandClipType_MEDIAN_STRETCH = 4
33  };
34 
37  const vector<double>& minPix,
38  const vector<double>& maxPix,
39  ossimBandClipType clipType=ossimBandClipType_NONE);
40 
42  double minPix,
43  double maxPix,
44  ossimBandClipType clipType=ossimBandClipType_NONE);
45 
46 
47  void setClipType(ossimBandClipType clipType);
48 
49  ossimBandClipType getClipType()const;
50 
51  virtual ossim_uint32 getNumberOfValues()const;
52 
53  void setNumberOfValues(ossim_uint32 size);
54 
55  void setMinMaxPix(const vector<double>& minPix,
56  const vector<double>& maxPix);
57 
58  const std::vector<double>& getMinPixList()const;
59  const std::vector<double> getMaxPixList()const;
60 
61  double getMinPix(ossim_uint32 index)const;
62  double getMaxPix(ossim_uint32 index)const;
63 
64  ossimRefPtr<ossimImageData> getTile(const ossimIrect& rect,
65  ossim_uint32 resLevel=0);
66 
67  virtual void initialize();
68 
69  virtual bool loadState(const ossimKeywordlist& kwl,
70  const char* prefix = NULL);
71 
72  virtual bool saveState(ossimKeywordlist& kwl,
73  const char* prefix = NULL)const;
74 protected:
75  virtual ~ossimBandClipFilter();
76 
77  void runClip();
78  void runClamp();
79  void runLinearStretch();
80  void runMedianStretch();
81 
82  std::vector<double> theMinPix; // normalized min
83  std::vector<double> theMaxPix; // normalized max
84  std::vector<double> theMedian; // normalized median.
85 
88 
90 };
91 
92 #endif
ossimRefPtr< ossimImageData > theTile
Represents serializable keyword/value map.
std::vector< double > theMaxPix
std::vector< double > theMedian
std::vector< double > theMinPix
yy_size_t size
#define TYPE_DATA
Definition: ossimRtti.h:339
unsigned int ossim_uint32
ossimBandClipType theClipType