OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimU16ImageData.h
Go to the documentation of this file.
1 //*******************************************************************
2 //
3 // License: MIT
4 //
5 // See LICENSE.txt file in the top level directory for more details.
6 //
7 // Author: David Burken
8 //
9 // Description:
10 //
11 // Class declaration of ossimU16ImageData. Specialized image data object for
12 // unsigned short data.
13 //
14 // NOTE: This object is optimized for unsigned short data and assumes the
15 // following: null pixel value = 0.0
16 // min pixel value = 1.0
17 // max pixel value = 65536.0 (2^16 - 1)
18 //
19 // If you want anything else use the less efficient ossimImageData.
20 //
21 //*************************************************************************
22 // $Id: ossimU16ImageData.h 16052 2009-12-08 22:20:40Z dburken $
23 
24 #ifndef ossimU16ImageData_HEADER
25 #define ossimU16ImageData_HEADER
26 
29 
31 {
32 public:
34  ossim_uint32 bands = 1);
35 
37  ossim_uint32 bands,
38  ossim_uint32 width,
39  ossim_uint32 height);
40 
42 
43 
47  virtual ossimObject* dup()const;
48 
53  void fill(ossim_uint32 band, double value);
54 
59  void fill(double value);
60 
61  virtual ossimDataObjectStatus validate() const;
62 
68  virtual void getNormalizedFloat(ossim_uint32 offset,
69  ossim_uint32 bandNumber,
70  float& result)const;
71 
76  virtual void setNormalizedFloat(ossim_uint32 offset,
77  ossim_uint32 bandNumber,
78  float input);
79 
84  virtual void convertToNormalizedFloat(ossimImageData* result)const;
85 
90  virtual void convertToNormalizedDouble(ossimImageData* result)const;
91 
103  virtual void unnormalizeInput(ossimImageData* normalizedInput);
104 
108  virtual double computeAverageBandValue(ossim_uint32 bandNumber = 0);
109 
121  virtual double computeMeanSquaredError(double meanValue,
122  ossim_uint32 bandNumber = 0);
123 
124  virtual void setValue(long x, long y, double color);
125 
131  virtual void copyTileToNormalizedBuffer(double* buf) const;
132 
139  virtual void copyNormalizedBufferToTile(double* buf);
140 
145  virtual void copyTileToNormalizedBuffer(ossim_uint32 band, double* buf) const;
146  virtual void copyTileToNormalizedBuffer(ossim_uint32 band, float* buf)const;
147 
153  virtual void copyTileToNormalizedBuffer(float* buf) const;
154 
161  virtual void copyNormalizedBufferToTile(float* buf);
162 
168  virtual void copyNormalizedBufferToTile(ossim_uint32 band,
169  double* buf);
170  virtual void copyNormalizedBufferToTile(ossim_uint32 band,
171  float* buf);
172 
174  virtual ossim_float64 getMinNormalizedPix() const;
175 
176 protected:
177  virtual ~ossimU16ImageData();
179 
180 private:
181 
183 
184 TYPE_DATA
185 };
186 
188 {
189  return m_remapTable[1];
190 }
191 
192 #endif
ossim_uint32 x
void fill(ossim_uint32 band, ossim_float64 value)
will fill the entire band with the value.
virtual void setValue(ossim_int32 x, ossim_int32 y, ossim_float64 color)
#define OSSIMDLLEXPORT
virtual ossim_float64 getMinNormalizedPix() const
returns normalized minimum pixel value of band zero.
ossim_uint32 y
virtual void getNormalizedFloat(ossim_uint32 offset, ossim_uint32 bandNumber, ossim_float32 &result) const
will go to the band and offset and compute the normalized float and return it back to the caller thro...
virtual ossim_float64 getMinNormalizedPix() const
virtual ossimObject * dup() const
static const ossimNormalizedU16RemapTable m_remapTable
double ossim_float64
virtual ossimDataObjectStatus validate() const
#define TYPE_DATA
Definition: ossimRtti.h:339
unsigned int ossim_uint32
virtual void unnormalizeInput(ossimImageData *normalizedInput)
Will take the normalized input and convert it to this tile's data type.
virtual ossim_float64 computeMeanSquaredError(ossim_float64 meanValue, ossim_uint32 bandNumber=0) const
This will call the compute average band value and then use that in the calculation of: ...
virtual void copyTileToNormalizedBuffer(ossim_float64 *buf) const
Copies entire tile to buf passed in.
virtual ossim_float64 computeAverageBandValue(ossim_uint32 bandNumber=0) const
This will compute the average value for the band.
virtual void copyNormalizedBufferToTile(ossim_float64 *buf)
Copies buf passed in to tile.
virtual void setNormalizedFloat(ossim_uint32 offset, ossim_uint32 bandNumber, ossim_float32 input)
This will assign to this object a normalized value by unnormalizing to its native type...
virtual void convertToNormalizedDouble(ossimImageData *result) const
Will use the memory that you pass in to normalize this data object.
ossimDataObjectStatus
Definitions for data object status.
virtual void convertToNormalizedFloat(ossimImageData *result) const
Will use the memory that you pass in to normalize this data object.
Unsigned 16 bit normalized remap table to go to/from normalized value to pixel value.