ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
colmap::Bitmap Class Reference

#include <bitmap.h>

Public Member Functions

 Bitmap ()
 
 Bitmap (const Bitmap &other)
 
 Bitmap (Bitmap &&other)
 
 Bitmap (FIBITMAP *data)
 
Bitmap & operator= (const Bitmap &other)
 
Bitmap & operator= (Bitmap &&other)
 
bool Allocate (const int width, const int height, const bool as_rgb)
 
void Deallocate ()
 
const FIBITMAP * Data () const
 
FIBITMAP * Data ()
 
int Width () const
 
int Height () const
 
int Channels () const
 
unsigned int BitsPerPixel () const
 
unsigned int ScanWidth () const
 
bool IsRGB () const
 
bool IsGrey () const
 
size_t NumBytes () const
 
std::vector< uint8_t > ConvertToRawBits () const
 
std::vector< uint8_t > ConvertToRowMajorArray () const
 
std::vector< uint8_t > ConvertToColMajorArray () const
 
bool GetPixel (const int x, const int y, BitmapColor< uint8_t > *color) const
 
bool SetPixel (const int x, const int y, const BitmapColor< uint8_t > &color)
 
const uint8_t * GetScanline (const int y) const
 
void Fill (const BitmapColor< uint8_t > &color)
 
bool InterpolateNearestNeighbor (const double x, const double y, BitmapColor< uint8_t > *color) const
 
bool InterpolateBilinear (const double x, const double y, BitmapColor< float > *color) const
 
bool ExifCameraModel (std::string *camera_model) const
 
bool ExifFocalLength (double *focal_length) const
 
bool ExifLatitude (double *latitude) const
 
bool ExifLongitude (double *longitude) const
 
bool ExifAltitude (double *altitude) const
 
bool Read (const std::string &path, const bool as_rgb=true)
 
bool Write (const std::string &path, const FREE_IMAGE_FORMAT format=FIF_UNKNOWN, const int flags=0) const
 
void Smooth (const float sigma_x, const float sigma_y)
 
void Rescale (const int new_width, const int new_height, const FREE_IMAGE_FILTER filter=FILTER_BILINEAR)
 
Bitmap Clone () const
 
Bitmap CloneAsGrey () const
 
Bitmap CloneAsRGB () const
 
void CloneMetadata (Bitmap *target) const
 
bool ReadExifTag (const FREE_IMAGE_MDMODEL model, const std::string &tag_name, std::string *result) const
 

Constructor & Destructor Documentation

◆ Bitmap() [1/4]

colmap::Bitmap::Bitmap ( )

Referenced by Clone(), CloneAsGrey(), and CloneAsRGB().

◆ Bitmap() [2/4]

colmap::Bitmap::Bitmap ( const Bitmap &  other)

◆ Bitmap() [3/4]

colmap::Bitmap::Bitmap ( Bitmap &&  other)

◆ Bitmap() [4/4]

colmap::Bitmap::Bitmap ( FIBITMAP *  data)
explicit

References data.

Member Function Documentation

◆ Allocate()

◆ BitsPerPixel()

unsigned int colmap::Bitmap::BitsPerPixel ( ) const
inline

◆ Channels()

int colmap::Bitmap::Channels ( ) const
inline

Referenced by BOOST_AUTO_TEST_CASE().

◆ Clone()

Bitmap colmap::Bitmap::Clone ( ) const

References Bitmap().

Referenced by BOOST_AUTO_TEST_CASE(), CloneAsGrey(), and CloneAsRGB().

◆ CloneAsGrey()

Bitmap colmap::Bitmap::CloneAsGrey ( ) const

◆ CloneAsRGB()

Bitmap colmap::Bitmap::CloneAsRGB ( ) const

References Bitmap(), Clone(), and IsRGB().

Referenced by BOOST_AUTO_TEST_CASE().

◆ CloneMetadata()

void colmap::Bitmap::CloneMetadata ( Bitmap *  target) const

◆ ConvertToColMajorArray()

std::vector< uint8_t > colmap::Bitmap::ConvertToColMajorArray ( ) const

References x, and y.

Referenced by BOOST_AUTO_TEST_CASE().

◆ ConvertToRawBits()

std::vector< uint8_t > colmap::Bitmap::ConvertToRawBits ( ) const

◆ ConvertToRowMajorArray()

std::vector< uint8_t > colmap::Bitmap::ConvertToRowMajorArray ( ) const

◆ Data() [1/2]

FIBITMAP* colmap::Bitmap::Data ( )
inline

◆ Data() [2/2]

const FIBITMAP * colmap::Bitmap::Data ( ) const
inline

◆ Deallocate()

void colmap::Bitmap::Deallocate ( )

Referenced by BOOST_AUTO_TEST_CASE().

◆ ExifAltitude()

bool colmap::Bitmap::ExifAltitude ( double *  altitude) const

References ReadExifTag(), and result.

Referenced by colmap::ImageReader::Next().

◆ ExifCameraModel()

bool colmap::Bitmap::ExifCameraModel ( std::string *  camera_model) const

◆ ExifFocalLength()

bool colmap::Bitmap::ExifFocalLength ( double *  focal_length) const

◆ ExifLatitude()

bool colmap::Bitmap::ExifLatitude ( double *  latitude) const

◆ ExifLongitude()

bool colmap::Bitmap::ExifLongitude ( double *  longitude) const

◆ Fill()

◆ GetPixel()

bool colmap::Bitmap::GetPixel ( const int  x,
const int  y,
BitmapColor< uint8_t > *  color 
) const

◆ GetScanline()

const uint8_t * colmap::Bitmap::GetScanline ( const int  y) const

References y.

Referenced by BOOST_AUTO_TEST_CASE().

◆ Height()

◆ InterpolateBilinear()

◆ InterpolateNearestNeighbor()

bool colmap::Bitmap::InterpolateNearestNeighbor ( const double  x,
const double  y,
BitmapColor< uint8_t > *  color 
) const

References color, GetPixel(), x, and y.

Referenced by BOOST_AUTO_TEST_CASE().

◆ IsGrey()

◆ IsRGB()

◆ NumBytes()

size_t colmap::Bitmap::NumBytes ( ) const

References ScanWidth().

Referenced by BOOST_AUTO_TEST_CASE().

◆ operator=() [1/2]

Bitmap & colmap::Bitmap::operator= ( Bitmap &&  other)

◆ operator=() [2/2]

Bitmap & colmap::Bitmap::operator= ( const Bitmap &  other)

◆ Read()

◆ ReadExifTag()

bool colmap::Bitmap::ReadExifTag ( const FREE_IMAGE_MDMODEL  model,
const std::string &  tag_name,
std::string *  result 
) const

◆ Rescale()

void colmap::Bitmap::Rescale ( const int  new_width,
const int  new_height,
const FREE_IMAGE_FILTER  filter = FILTER_BILINEAR 
)

◆ ScanWidth()

unsigned int colmap::Bitmap::ScanWidth ( ) const
inline

◆ SetPixel()

◆ Smooth()

void colmap::Bitmap::Smooth ( const float  sigma_x,
const float  sigma_y 
)

References x, and y.

Referenced by BOOST_AUTO_TEST_CASE().

◆ Width()

◆ Write()

bool colmap::Bitmap::Write ( const std::string &  path,
const FREE_IMAGE_FORMAT  format = FIF_UNKNOWN,
const int  flags = 0 
) const

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