OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimU12ImageData.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 with an 12 bit depth.
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 = 4095.0 (2^12 - 1)
18 //
19 // If you want anything else use the less efficient ossimImageData.
20 //
21 //*************************************************************************
22 // $Id: ossimU12ImageData.h 16052 2009-12-08 22:20:40Z dburken $
23 
24 #ifndef ossimU12ImageData_HEADER
25 #define ossimU12ImageData_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 
44  virtual ossimObject* dup()const;
45 
50  void fill(ossim_uint32 band, double value);
51 
52  bool isNull(ossim_uint32 offset)const;
53  void setNull(ossim_uint32 offset);
54 
55  virtual ossimDataObjectStatus validate() const;
56 
62  virtual void getNormalizedFloat(ossim_uint32 offset,
63  ossim_uint32 bandNumber,
64  float& result)const;
65 
70  virtual void setNormalizedFloat(ossim_uint32 offset,
71  ossim_uint32 bandNumber,
72  float input);
73 
78  virtual void convertToNormalizedFloat(ossimImageData* result)const;
79 
84  virtual void convertToNormalizedDouble(ossimImageData* result)const;
85 
97  virtual void unnormalizeInput(ossimImageData* normalizedInput);
98 
102  virtual double computeAverageBandValue(ossim_uint32 bandNumber = 0);
103 
115  virtual double computeMeanSquaredError(double meanValue,
116  ossim_uint32 bandNumber = 0);
117 
118  virtual void setValue(long x, long y, double color);
119 
125  virtual void copyTileToNormalizedBuffer(double* buf) const;
126 
133  virtual void copyNormalizedBufferToTile(double* buf);
134 
139  virtual void copyTileToNormalizedBuffer(ossim_uint32 band,
140  double* buf) const;
141  virtual void copyTileToNormalizedBuffer(ossim_uint32 band,
142  float* buf)const;
143 
149  virtual void copyTileToNormalizedBuffer(float* buf) const;
150 
157  virtual void copyNormalizedBufferToTile(float* buf);
158 
164  virtual void copyNormalizedBufferToTile(ossim_uint32 band,
165  double* buf);
166  virtual void copyNormalizedBufferToTile(ossim_uint32 band,
167  float* buf);
168 
170  virtual ossim_float64 getMinNormalizedPix() const;
171 
172 protected:
173  virtual ~ossimU12ImageData();
175 
176 private:
177 
179 
180 TYPE_DATA
181 };
182 
184 {
185  return m_remapTable[1];
186 }
187 
188 #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)
Twelve bit normalized remap table to go to/from normalized value to pixel value.
#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 ossimObject * dup() const
bool isNull(ossim_uint32 offset) const
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: ...
static const ossimNormalizedU12RemapTable m_remapTable
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.
void setNull(ossim_uint32 offset)
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 ossim_float64 getMinNormalizedPix() const
virtual void convertToNormalizedFloat(ossimImageData *result) const
Will use the memory that you pass in to normalize this data object.