libopenraw  0.3.7
Classes | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
OpenRaw::MosaicInfo Class Reference

Info on the mosaic for the Colour Filter Array. More...

#include <mosaicinfo.hpp>

Inheritance diagram for OpenRaw::MosaicInfo:
OpenRaw::Internals::Cfa2x2RgbPattern OpenRaw::Internals::XTransPattern

Classes

class  Private
 

Public Member Functions

void setSize (uint16_t x, uint16_t y)
 Set the pattern size.
 
void getSize (uint16_t &x, uint16_t &y) const
 Get the pattern size.
 
bool isCFA () const
 Return of the mosaic is a Color Filter Array.
 
bool is2by2Rgb () const
 Return if the pattern is 2x2 RGB.
 
::or_cfa_pattern patternType () const
 
const uint8_t * patternPattern (uint16_t &count) const
 Return the pattern's pattern. More...
 

Static Public Member Functions

static const MosaicInfotwoByTwoPattern (::or_cfa_pattern)
 Factory to return a singleton instance of the right pattern. More...
 

Protected Member Functions

 MosaicInfo (::or_cfa_pattern pattern, uint16_t width, uint16_t height)
 Construct a MosaicInfo. More...
 
void setPatternPattern (const uint8_t *pattern, uint16_t count)
 Set the pattern pattern. More...
 
 MosaicInfo (const MosaicInfo &)=delete
 
MosaicInfooperator= (const MosaicInfo &)=delete
 
void setPatternType (::or_cfa_pattern pattern)
 Set the pattern type.
 

Protected Attributes

Privated
 Private data.
 

Detailed Description

Info on the mosaic for the Colour Filter Array.

Definition at line 32 of file mosaicinfo.hpp.

Constructor & Destructor Documentation

◆ MosaicInfo()

OpenRaw::MosaicInfo::MosaicInfo ( ::or_cfa_pattern  pattern,
uint16_t  width,
uint16_t  height 
)
protected

Construct a MosaicInfo.

Parameters
patternThe pattern.
widthThe horizontal dimension in pixels.
heightThe vertical dimension in pixels.

Definition at line 129 of file mosaicinfo.cpp.

References setPatternType(), and setSize().

Member Function Documentation

◆ patternPattern()

const uint8_t * OpenRaw::MosaicInfo::patternPattern ( uint16_t &  count) const

Return the pattern's pattern.

Parameters
[out]countThe number of elements in the pattern.
Returns
The pattern bytes. The pointer is owned but the MosaicInfo.

Definition at line 178 of file mosaicinfo.cpp.

References d.

Referenced by or_mosaicinfo_get_pattern().

◆ patternType()

or_cfa_pattern OpenRaw::MosaicInfo::patternType ( ) const
Returns
the pattern type. Be cautious as this does not cover non 2x2 RGB.

Definition at line 199 of file mosaicinfo.cpp.

References d.

◆ setPatternPattern()

void OpenRaw::MosaicInfo::setPatternPattern ( const uint8_t *  pattern,
uint16_t  count 
)
protected

Set the pattern pattern.

Parameters
patternthe actual pattern sequence left to right, top to bottom
countthe number of element. Should be width x height

Definition at line 167 of file mosaicinfo.cpp.

References d.

◆ twoByTwoPattern()

const MosaicInfo * OpenRaw::MosaicInfo::twoByTwoPattern ( ::or_cfa_pattern  pattern)
static

Factory to return a singleton instance of the right pattern.

Returns
a const MosaicInfo. Never delete it. MAY BE NULL.

Definition at line 84 of file mosaicinfo.cpp.


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