Fawkes API  Fawkes Development Version
firevision::RectificationInfoFile Class Reference

Rectification Info File. More...

#include <>>

Inheritance diagram for firevision::RectificationInfoFile:

Classes

class  RectInfoBlockVector
 Vector that is used for maintaining the rectification info blocks. More...
 

Public Member Functions

 RectificationInfoFile ()
 Constructor. More...
 
 RectificationInfoFile (uint64_t cam_guid, const char *model)
 Constructor. More...
 
 ~RectificationInfoFile ()
 Destructor. More...
 
uint64_t guid ()
 Get the GUID of camera. More...
 
const char * model ()
 Get the model of the camera. More...
 
void add_rectinfo_block (RectificationInfoBlock *block)
 Add a rectification info block. More...
 
RectInfoBlockVectorrectinfo_blocks ()
 Get all rectification info blocks. More...
 
virtual void read (const char *filename)
 Read file. More...
 
- Public Member Functions inherited from firevision::FireVisionDataFile
 FireVisionDataFile (unsigned short int magic_token, unsigned short int version)
 Constructor. More...
 
virtual ~FireVisionDataFile ()
 Destructor. More...
 
unsigned int magic_token ()
 Get the magic token of the file. More...
 
unsigned int version ()
 Get the version of the file. More...
 
bool is_big_endian ()
 Check if data is encoded as big endian. More...
 
bool is_little_endian ()
 Check if data is encoded as little endian. More...
 
size_t num_blocks ()
 Get the number of available info blocks. More...
 
const char * get_comment () const
 Get comment. More...
 
void set_comment (const char *comment)
 Set comment. More...
 
void set_owns_blocks (bool owns_blocks)
 Lets the file take over the ownership and give up the ownership of the blocks, respectively. More...
 
virtual void add_block (FireVisionDataFileBlock *block)
 Add a block. More...
 
virtual void clear ()
 Clear internal storage. More...
 
virtual void write (const char *file_name)
 Write file. More...
 
BlockListblocks ()
 Get blocks. More...
 

Additional Inherited Members

- Public Types inherited from firevision::FireVisionDataFile
typedef std::list< FireVisionDataFileBlock * > BlockList
 List of FireVision data file blocks. More...
 
- Static Public Member Functions inherited from firevision::FireVisionDataFile
static unsigned short int read_magic_token (const char *filename)
 Get magic token from file. More...
 
static bool has_magic_token (const char *filename, unsigned short int magic_token)
 Check if file has a certain magic token. More...
 
- Protected Attributes inherited from firevision::FireVisionDataFile
void * _spec_header
 Content specific header. More...
 
size_t _spec_header_size
 Size in bytes of _spec_header. More...
 

Detailed Description

Rectification Info File.

This class provides access files that contain rectification info. Currently it supports writing and reading of such data and supports any number of rectificatoin info blocks (although this is limited by the file format!).

It follows the file format as defined in rectinfo.h. Files that are written are always of the current version. The endianess is automatically set to the current's system endianess.

Author
Tim Niemueller

Definition at line 38 of file rectfile.h.

Constructor & Destructor Documentation

◆ RectificationInfoFile() [1/2]

firevision::RectificationInfoFile::RectificationInfoFile ( )

Constructor.

This constructor may only be used for reading files, as the GUID of the camera is invalid for writing.

Definition at line 80 of file rectfile.cpp.

References firevision::FireVisionDataFile::_spec_header, firevision::FireVisionDataFile::_spec_header_size, firevision::_rectinfo_header_t::camera_model, and firevision::_rectinfo_header_t::guid.

◆ RectificationInfoFile() [2/2]

firevision::RectificationInfoFile::RectificationInfoFile ( uint64_t  cam_guid,
const char *  model 
)

Constructor.

Parameters
cam_guidCamera globally unique identifier.
modelString with the model name of the camera

Definition at line 61 of file rectfile.cpp.

References firevision::FireVisionDataFile::_spec_header, firevision::FireVisionDataFile::_spec_header_size, firevision::_rectinfo_header_t::camera_model, and firevision::_rectinfo_header_t::guid.

◆ ~RectificationInfoFile()

firevision::RectificationInfoFile::~RectificationInfoFile ( )

Destructor.

Definition at line 96 of file rectfile.cpp.

Member Function Documentation

◆ add_rectinfo_block()

void firevision::RectificationInfoFile::add_rectinfo_block ( RectificationInfoBlock block)

Add a rectification info block.

This instance takes over ownership of the rectinfo block. This means that the object is automatically deleted if this instance is deleted.

Parameters
blockblock to add

Definition at line 128 of file rectfile.cpp.

References firevision::FireVisionDataFile::add_block().

Referenced by firevision::TriclopsStereoProcessor::generate_rectification_lut().

◆ guid()

uint64_t firevision::RectificationInfoFile::guid ( )

Get the GUID of camera.

Returns
GUID of the camera this rectification info file belongs to.

Definition at line 106 of file rectfile.cpp.

References firevision::_rectinfo_header_t::guid.

Referenced by firevision::TriclopsStereoProcessor::verify_rectification_lut().

◆ model()

const char * firevision::RectificationInfoFile::model ( )

Get the model of the camera.

Returns
string with the camera's model name

Definition at line 116 of file rectfile.cpp.

◆ read()

void firevision::RectificationInfoFile::read ( const char *  file_name)
virtual

◆ rectinfo_blocks()

RectificationInfoFile::RectInfoBlockVector * firevision::RectificationInfoFile::rectinfo_blocks ( )

Get all rectification info blocks.

Returns
reference to internal vector of rectinfo blocks.

Definition at line 138 of file rectfile.cpp.

References firevision::FireVisionDataFile::blocks().

Referenced by firevision::TriclopsStereoProcessor::verify_rectification_lut().


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