OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimNormalizedS16RemapTable.cpp
Go to the documentation of this file.
1 //*******************************************************************
2 //
3 // License: LGPL
4 //
5 // See LICENSE.txt file in the top level directory for more details.
6 //
7 // Description:
8 //
9 // Contains class definition for ossimNormalizedS16RemapTable.
10 //
11 //*******************************************************************
12 // $Id: ossimNormalizedS16RemapTable.cpp 9963 2006-11-28 21:11:01Z gpotts $
13 
15 
18 
21 {
23  {
24  const ossim_int32 ENTRIES = getEntries();
25  const ossim_float64 DENOMINATOR = getNormalizer();
26 
27  //---
28  // Initialize the remap table.
29  //
30  // Specialized for elevation, make -32768 and -32767 map to 0 since
31  // DTED NULL is -32767.
32  //
33  // NOTE: Zero will always remap back to -32768 with this hack. This
34  // could cause issues on writers that use pixFromNorm(). (drb)
35  //---
36  theTable[0] = 0.0; // Index zero always for null.
37  theTable[1] = 0.0; // Specialized for DTED.
38 
39  for (ossim_int32 i = 2; i < ENTRIES; ++i)
40  {
41  theTable[i] = static_cast<ossim_float64>(i)/DENOMINATOR;
42  }
43 
44  theTableIsInitialized = true;
45  }
46 }
47 
49 {}
virtual ossim_int32 getEntries() const
Gets the number of table entries.
double ossim_float64
virtual ~ossimNormalizedS16RemapTable()
virtual destructor
Base class implemetation of normalized remap tables to go to/from normalized value to pixel value...
virtual ossim_float64 getNormalizer() const
Get the value used to normalize and un-normalize table entries.
static ossim_float64 theTable[TABLE_ENTRIES]
ossimNormalizedS16RemapTable()
default constructor
int ossim_int32