OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
PortableBitmapReader Class Reference

#include <PortableBitmapReader.h>

Public Member Functions

 PortableBitmapReader (const std::string &input)
 
unsigned int getWidth () const
 
unsigned int getHeight () const
 
bool isBlack (unsigned int i, unsigned int j) const
 
std::vector< bool > getPixels () const
 
void print (std::ostream &out) const
 

Private Types

enum  FileType { ASCII, BINARY }
 

Private Member Functions

void readHeader (std::istream &in)
 
void readImageAscii (std::istream &in)
 
void readImageBinary (std::istream &in)
 
std::string getNextPart (std::istream &in)
 
unsigned int getIdx (unsigned int h, unsigned int w) const
 

Private Attributes

unsigned int width_m
 
unsigned int height_m
 
FileType type_m
 
std::vector< bool > pixels_m
 

Detailed Description

Definition at line 10 of file PortableBitmapReader.h.

Member Enumeration Documentation

Enumerator
ASCII 
BINARY 

Definition at line 32 of file PortableBitmapReader.h.

Constructor & Destructor Documentation

PortableBitmapReader::PortableBitmapReader ( const std::string &  input)

Definition at line 8 of file PortableBitmapReader.cpp.

References ASCII, height_m, pixels_m, readHeader(), readImageAscii(), readImageBinary(), type_m, and width_m.

Here is the call graph for this function:

Member Function Documentation

unsigned int PortableBitmapReader::getHeight ( ) const
inline

Definition at line 48 of file PortableBitmapReader.h.

References height_m.

Referenced by mslang::Mask::parse_detail().

unsigned int PortableBitmapReader::getIdx ( unsigned int  h,
unsigned int  w 
) const
inlineprivate

Definition at line 63 of file PortableBitmapReader.h.

References height_m, and width_m.

Referenced by isBlack(), and print().

std::string PortableBitmapReader::getNextPart ( std::istream &  in)
private

Definition at line 21 of file PortableBitmapReader.cpp.

References Physics::c.

Referenced by readHeader().

std::vector< bool > PortableBitmapReader::getPixels ( ) const
inline

Definition at line 58 of file PortableBitmapReader.h.

References pixels_m.

Referenced by mslang::Mask::parse_detail().

unsigned int PortableBitmapReader::getWidth ( ) const
inline

Definition at line 43 of file PortableBitmapReader.h.

References width_m.

Referenced by mslang::Mask::parse_detail().

bool PortableBitmapReader::isBlack ( unsigned int  i,
unsigned int  j 
) const
inline

Definition at line 53 of file PortableBitmapReader.h.

References getIdx(), and pixels_m.

Here is the call graph for this function:

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

Definition at line 110 of file PortableBitmapReader.cpp.

References endl(), getIdx(), height_m, pixels_m, and width_m.

Here is the call graph for this function:

void PortableBitmapReader::readHeader ( std::istream &  in)
private

Definition at line 44 of file PortableBitmapReader.cpp.

References ASCII, BINARY, getNextPart(), height_m, type_m, and width_m.

Referenced by PortableBitmapReader().

Here is the call graph for this function:

void PortableBitmapReader::readImageAscii ( std::istream &  in)
private

Definition at line 74 of file PortableBitmapReader.cpp.

References Physics::c, height_m, pixels_m, and width_m.

Referenced by PortableBitmapReader().

void PortableBitmapReader::readImageBinary ( std::istream &  in)
private

Definition at line 91 of file PortableBitmapReader.cpp.

References Physics::c, height_m, pixels_m, and width_m.

Referenced by PortableBitmapReader().

Member Data Documentation

unsigned int PortableBitmapReader::height_m
private
std::vector<bool> PortableBitmapReader::pixels_m
private
FileType PortableBitmapReader::type_m
private

Definition at line 37 of file PortableBitmapReader.h.

Referenced by PortableBitmapReader(), and readHeader().

unsigned int PortableBitmapReader::width_m
private

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