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

#include <ossimRpfMaskSubheader.h>

Public Member Functions

 ossimRpfMaskSubheader ()
 
virtual ~ossimRpfMaskSubheader ()
 
ossimErrorCode parseStream (std::istream &in, ossimByteOrder byteOrder)
 
void print (std::ostream &out) const
 

Private Member Functions

void clearFields ()
 

Private Attributes

unsigned short theSubframeSequenceRecordLength
 
unsigned short theTransparencySequenceRecordLength
 
unsigned short theTransparentOutputPixelCodeLength
 
unsigned char * theOutputPixelCodeBitString
 
long theNumberOfBytes
 

Friends

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

Detailed Description

Definition at line 9 of file ossimRpfMaskSubheader.h.

Constructor & Destructor Documentation

◆ ossimRpfMaskSubheader()

ossimRpfMaskSubheader::ossimRpfMaskSubheader ( )

◆ ~ossimRpfMaskSubheader()

ossimRpfMaskSubheader::~ossimRpfMaskSubheader ( )
virtual

Definition at line 23 of file ossimRpfMaskSubheader.cpp.

References theOutputPixelCodeBitString.

24 {
26  {
29  }
30 }
unsigned char * theOutputPixelCodeBitString

Member Function Documentation

◆ clearFields()

void ossimRpfMaskSubheader::clearFields ( )
private

◆ parseStream()

ossimErrorCode ossimRpfMaskSubheader::parseStream ( std::istream &  in,
ossimByteOrder  byteOrder 
)

Definition at line 32 of file ossimRpfMaskSubheader.cpp.

References ossim::byteOrder(), clearFields(), ossimEndian::getSystemEndianType(), ossimErrorCodes::OSSIM_ERROR, ossimErrorCodes::OSSIM_OK, ossimEndian::swap(), theNumberOfBytes, theOutputPixelCodeBitString, theSubframeSequenceRecordLength, theTransparencySequenceRecordLength, and theTransparentOutputPixelCodeLength.

Referenced by ossimRpfMaskSubsection::parseStream(), and ossimRpfFrame::populateImageSection().

34 {
35  if(in)
36  {
37  clearFields();
38 
39  in.read((char*)&theSubframeSequenceRecordLength, 2);
40  in.read((char*)&theTransparencySequenceRecordLength, 2);
41  in.read((char*)&theTransparentOutputPixelCodeLength, 2);
42  ossimEndian anEndian;
43 
44  if(anEndian.getSystemEndianType() != byteOrder)
45  {
49 
50  }
52  {
54  theOutputPixelCodeBitString = new unsigned char[theNumberOfBytes];
56  }
57  }
58  else
59  {
61  }
62 
64 }
unsigned short theTransparentOutputPixelCodeLength
static const ossimErrorCode OSSIM_OK
OSSIM_DLL ossimByteOrder byteOrder()
Definition: ossimCommon.cpp:54
static const ossimErrorCode OSSIM_ERROR
unsigned short theSubframeSequenceRecordLength
unsigned char * theOutputPixelCodeBitString
ossimByteOrder getSystemEndianType() const
Definition: ossimEndian.h:78
void swap(ossim_sint8 &)
Definition: ossimEndian.h:26
unsigned short theTransparencySequenceRecordLength

◆ print()

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

Definition at line 66 of file ossimRpfMaskSubheader.cpp.

References theNumberOfBytes, theOutputPixelCodeBitString, theSubframeSequenceRecordLength, theTransparencySequenceRecordLength, and theTransparentOutputPixelCodeLength.

Referenced by operator<<().

67 {
68  out << "theSubframeSequenceRecordLength: "
70  << "\ntheTransparencySequenceRecordLength: "
72  << "\ntheTransparentOutputPixelCodeLength: "
74  << "\ntheNumberOfBytes: "
76  << "\ntheOutputPixelCodeBitString: ";
77 
78  // display the pixel code as a bit pattern.
79  for(long index = theNumberOfBytes-1;
80  index >=0;
81  --index)
82  {
83  unsigned long temp = theOutputPixelCodeBitString[index];
84  out << ((temp>>7)&1)
85  << ((temp>>6)&1)
86  << ((temp>>5)&1)
87  << ((temp>>4)&1)
88  << ((temp>>3)&1)
89  << ((temp>>2)&1)
90  << ((temp>>1)&1)
91  << (temp&1);
92  }
93  out << std::endl;
94 }
unsigned short theTransparentOutputPixelCodeLength
unsigned short theSubframeSequenceRecordLength
unsigned char * theOutputPixelCodeBitString
unsigned short theTransparencySequenceRecordLength

Friends And Related Function Documentation

◆ operator<<

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

Definition at line 6 of file ossimRpfMaskSubheader.cpp.

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

Member Data Documentation

◆ theNumberOfBytes

long ossimRpfMaskSubheader::theNumberOfBytes
private

This is just a working variable and is not part of the Rpf fields. this is the number of bytes of the output pixel code length. It divides by 8 and then does the ceiling of the theTransparentOutputPixelCodeLength.

Definition at line 37 of file ossimRpfMaskSubheader.h.

Referenced by clearFields(), parseStream(), and print().

◆ theOutputPixelCodeBitString

unsigned char* ossimRpfMaskSubheader::theOutputPixelCodeBitString
private

Definition at line 28 of file ossimRpfMaskSubheader.h.

Referenced by clearFields(), parseStream(), print(), and ~ossimRpfMaskSubheader().

◆ theSubframeSequenceRecordLength

unsigned short ossimRpfMaskSubheader::theSubframeSequenceRecordLength
private

Definition at line 25 of file ossimRpfMaskSubheader.h.

Referenced by clearFields(), parseStream(), and print().

◆ theTransparencySequenceRecordLength

unsigned short ossimRpfMaskSubheader::theTransparencySequenceRecordLength
private

Definition at line 26 of file ossimRpfMaskSubheader.h.

Referenced by clearFields(), parseStream(), and print().

◆ theTransparentOutputPixelCodeLength

unsigned short ossimRpfMaskSubheader::theTransparentOutputPixelCodeLength
private

Definition at line 27 of file ossimRpfMaskSubheader.h.

Referenced by clearFields(), parseStream(), and print().


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