OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimLinearStretchRemapper.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: Oscar Kramer
9 //
10 //*************************************************************************
11 // $Id: ossimLinearRemapper.h 23616 2015-11-11 19:50:29Z dburken $
12 #ifndef ossimLinearRemapper_HEADER
13 #define ossimLinearRemapper_HEADER
14 
18 #include <vector>
19 
20 class ossimImageData;
21 
22 /***************************************************************************************************
23  *
24  * This class provides a linear remap between a min and a max value. Default is to do a linear
25  * stretch between the input connection's min and max, but the user can also define specific min
26  * and max. In the latter case, the input pixels outside the range will be clamped.
27  *
28  * If non-default min and max values are to be used, the min and max values must be set for all
29  * bands, otherwise the defaults will be used for all bands.
30  *
31  * The output scalar type is normalized double.
32  *
33  **************************************************************************************************/
35 {
36 public:
37 
39  virtual ~ossimLinearStretchRemapper();
40 
41  virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& origin,
42  ossim_uint32 resLevel=0);
43 
44  void setMinPixelValue(double value, ossim_uint32 band=0);
45  void setMaxPixelValue(double value, ossim_uint32 band=0);
46 
47  virtual double getMinPixelValue(ossim_uint32 band=0)const;
48  virtual double getMaxPixelValue(ossim_uint32 band=0)const;
49 
50  virtual void initialize();
51 
52  virtual bool saveState(ossimKeywordlist& kwl, const char* prefix=NULL)const;
53 
54  virtual bool loadState(const ossimKeywordlist& kwl, const char* prefix=NULL);
55 
57 
58 protected:
59 
63  void allocate();
64 
65  std::vector<double> m_minValues;
66  std::vector<double> m_maxValues;
68 
70 };
71 
72 #endif /* #ifndef ossimLinearRemapper_HEADER */
Represents serializable keyword/value map.
virtual ossimScalarType getOutputScalarType() const
This will be used to query the output pixel type of the tile source.
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.
ossimScalarType
64 bit normalized floating point
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.
#define OSSIM_DLL
ossimRefPtr< ossimImageData > m_tile
virtual ossimRefPtr< ossimImageData > getTile(const ossimIpt &origin, ossim_uint32 resLevel=0)