OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
Public Member Functions | Private Attributes | Friends | List of all members
ossimRpfColorConverterTable Class Reference

#include <ossimRpfColorConverterTable.h>

Public Member Functions

 ossimRpfColorConverterTable ()
 
virtual ~ossimRpfColorConverterTable ()
 
ossimErrorCode parseStream (ossim::istream &in, ossimByteOrder byteOrder)
 
void print (std::ostream &out) const
 
ossim_uint32 getEntry (ossim_uint32 entry)
 
void setNumberOfEntries (ossim_uint32 entries)
 
void setTableId (ossim_uint16 id)
 
const ossim_uint32getEntryList () const
 
ossim_uint32 getNumberOfEntries () const
 

Private Attributes

ossim_uint16 theTableId
 
ossim_uint32 theNumberOfEntries
 
ossim_uint32theColorGrayscaleTableEntryList
 

Friends

std::ostream & operator<< (std::ostream &out, const ossimRpfColorConverterTable &data)
 

Detailed Description

Definition at line 8 of file ossimRpfColorConverterTable.h.

Constructor & Destructor Documentation

◆ ossimRpfColorConverterTable()

ossimRpfColorConverterTable::ossimRpfColorConverterTable ( )

◆ ~ossimRpfColorConverterTable()

ossimRpfColorConverterTable::~ossimRpfColorConverterTable ( )
virtual

Definition at line 20 of file ossimRpfColorConverterTable.cpp.

References theColorGrayscaleTableEntryList.

21 {
23  {
26  }
27 }

Member Function Documentation

◆ getEntry()

ossim_uint32 ossimRpfColorConverterTable::getEntry ( ossim_uint32  entry)
inline

Definition at line 20 of file ossimRpfColorConverterTable.h.

References theColorGrayscaleTableEntryList.

◆ getEntryList()

const ossim_uint32* ossimRpfColorConverterTable::getEntryList ( ) const
inline

◆ getNumberOfEntries()

ossim_uint32 ossimRpfColorConverterTable::getNumberOfEntries ( ) const
inline

Definition at line 24 of file ossimRpfColorConverterTable.h.

References theNumberOfEntries.

◆ parseStream()

ossimErrorCode ossimRpfColorConverterTable::parseStream ( ossim::istream in,
ossimByteOrder  byteOrder 
)

Definition at line 28 of file ossimRpfColorConverterTable.cpp.

References ossim::byteOrder(), ossimEndian::getSystemEndianType(), ossimErrorCodes::OSSIM_ERROR, ossimErrorCodes::OSSIM_OK, ossimEndian::swap(), theColorGrayscaleTableEntryList, and theNumberOfEntries.

30 {
31  if(in)
32  {
33  if(theNumberOfEntries > 0)
34  {
36 
37  ossimEndian anEndian;
38  if(anEndian.getSystemEndianType() != byteOrder)
39  {
40  for(ossim_uint32 index = 0;
41  index < theNumberOfEntries;
42  ++index)
43  {
44  anEndian.swap(theColorGrayscaleTableEntryList[index]);
45  }
46  }
47  }
48  }
49  else
50  {
52  }
53 
55 }
static const ossimErrorCode OSSIM_OK
OSSIM_DLL ossimByteOrder byteOrder()
Definition: ossimCommon.cpp:54
static const ossimErrorCode OSSIM_ERROR
unsigned int ossim_uint32
ossimByteOrder getSystemEndianType() const
Definition: ossimEndian.h:78
void swap(ossim_sint8 &)
Definition: ossimEndian.h:26

◆ print()

void ossimRpfColorConverterTable::print ( std::ostream &  out) const

Definition at line 57 of file ossimRpfColorConverterTable.cpp.

References theColorGrayscaleTableEntryList, theNumberOfEntries, and theTableId.

Referenced by operator<<().

58 {
59  out << "theTableId: " << theTableId << "\n"
60  << "theNumberOfEntries: " << theNumberOfEntries << "\n";
61 
63  {
64  out << "Values:\n";
65  for(ossim_uint32 index=0; index < theNumberOfEntries; index++)
66  {
67  out<< theColorGrayscaleTableEntryList[index] << "\n";
68  }
69  }
70 
71 }
unsigned int ossim_uint32

◆ setNumberOfEntries()

void ossimRpfColorConverterTable::setNumberOfEntries ( ossim_uint32  entries)

Definition at line 73 of file ossimRpfColorConverterTable.cpp.

References theColorGrayscaleTableEntryList, and theNumberOfEntries.

74 {
76  {
79  }
81  theNumberOfEntries = entries;
82 
83  for(ossim_uint32 index=0;
84  index < theNumberOfEntries;
85  ++index)
86  {
88  }
89 }
unsigned int ossim_uint32

◆ setTableId()

void ossimRpfColorConverterTable::setTableId ( ossim_uint16  id)

Definition at line 90 of file ossimRpfColorConverterTable.cpp.

References theTableId.

91 {
92  theTableId = id;
93 }

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  out,
const ossimRpfColorConverterTable data 
)
friend

Definition at line 6 of file ossimRpfColorConverterTable.cpp.

8 {
9  data.print(out);
10  return out;
11 }
void print(std::ostream &out) const

Member Data Documentation

◆ theColorGrayscaleTableEntryList

ossim_uint32* ossimRpfColorConverterTable::theColorGrayscaleTableEntryList
private

This will hold the lookup table values.

Definition at line 41 of file ossimRpfColorConverterTable.h.

Referenced by getEntry(), getEntryList(), ossimRpfColorConverterTable(), parseStream(), print(), setNumberOfEntries(), and ~ossimRpfColorConverterTable().

◆ theNumberOfEntries

ossim_uint32 ossimRpfColorConverterTable::theNumberOfEntries
private

Holds the number of entries

Definition at line 36 of file ossimRpfColorConverterTable.h.

Referenced by getNumberOfEntries(), ossimRpfColorConverterTable(), parseStream(), print(), and setNumberOfEntries().

◆ theTableId

ossim_uint16 ossimRpfColorConverterTable::theTableId
private

This will not be a field read from the stream this is the value in the color converter offset table.

Definition at line 31 of file ossimRpfColorConverterTable.h.

Referenced by ossimRpfColorConverterTable(), print(), and setTableId().


The documentation for this class was generated from the following files: