egami
C++ Image Processing program
Classes | Public Member Functions | Protected Member Functions | Protected Attributes | Friends
Image Class Reference

Image data manipulation facility. More...

#include <image.hpp>

Inheritance diagram for Image:
Inheritance graph
[legend]

List of all members.

Classes

class  const_iterator
class  iterator

Public Member Functions

 Image (const std::string &filepath)
 Constructs an image from a file.
 Image (unsigned height, unsigned width)
 Image ()
 Image (const Image &)
 Image (Image &&) noexcept
Imageoperator= (Image) noexcept
void save_img (const std::string &fp) const
Row_proxy operator[] (unsigned y)
 Returns a proxy to the yth row of the image.
const_Row_proxy operator[] (unsigned y) const
 Returns a const proxy to the yth row of the image.
Pixel_proxy at (unsigned y, unsigned x)
const_Pixel_proxy at (unsigned y, unsigned x) const
iterator begin () noexcept
iterator end () noexcept
const_iterator begin () const noexcept
const_iterator end () const noexcept
unsigned char red (unsigned y, unsigned x) const
unsigned char green (unsigned y, unsigned x) const
unsigned char blue (unsigned y, unsigned x) const
unsigned char m_red (int y, int x) const
unsigned char m_green (int y, int x) const
unsigned char m_blue (int y, int x) const
void red (unsigned y, unsigned x, unsigned char v)
void green (unsigned y, unsigned x, unsigned char v)
void blue (unsigned y, unsigned x, unsigned char v)
unsigned width () const noexcept
unsigned height () const noexcept
bool has_roi () const
unsigned true_width () const
unsigned true_height () const
unsigned x_win () const
unsigned y_win () const
void clip (unsigned y, unsigned x, unsigned dy, unsigned dx)
void unclip ()

Protected Member Functions

unsigned rowstride () const noexcept
unsigned n_channels () const noexcept

Protected Attributes

Glib::RefPtr< Gdk::Pixbuf > data
bool regionalised
unsigned clip_x
unsigned clip_y
unsigned clip_dx
unsigned clip_dy

Friends

class Pixel_proxy
class const_Pixel_proxy
void swap (Image &lhs, Image &rhs) noexcept

Detailed Description

Image data manipulation facility.

Definition at line 101 of file image.hpp.


Constructor & Destructor Documentation

Image::Image ( const std::string &  filepath)

Constructs an image from a file.

Parameters:
filepaththe path to the image file

Definition at line 10 of file image.cpp.

Image::Image ( unsigned  height,
unsigned  width 
)

Definition at line 18 of file image.cpp.

Image::Image ( )
Image::Image ( const Image other)

Todo:
FIXME in case of regionalised

Definition at line 13 of file image.cpp.

Image::Image ( Image &&  other)

Definition at line 21 of file image.cpp.


Member Function Documentation

Pixel_proxy Image::at ( unsigned  y,
unsigned  x 
)

Definition at line 56 of file image.cpp.

const_Pixel_proxy Image::at ( unsigned  y,
unsigned  x 
) const

Definition at line 60 of file image.cpp.

Image::const_iterator Image::begin ( ) const

Definition at line 72 of file image.cpp.

Image::iterator Image::begin ( )

Definition at line 64 of file image.cpp.

Here is the caller graph for this function:

void Image::blue ( unsigned  y,
unsigned  x,
unsigned char  v 
)

Definition at line 104 of file image.cpp.

Here is the call graph for this function:

unsigned char Image::blue ( unsigned  y,
unsigned  x 
) const

Definition at line 116 of file image.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void Image::clip ( unsigned  y,
unsigned  x,
unsigned  dy,
unsigned  dx 
)

Definition at line 173 of file image.cpp.

Here is the caller graph for this function:

Image::iterator Image::end ( )

Definition at line 68 of file image.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Image::const_iterator Image::end ( ) const

Definition at line 76 of file image.cpp.

Here is the call graph for this function:

void Image::green ( unsigned  y,
unsigned  x,
unsigned char  v 
)

Definition at line 100 of file image.cpp.

Here is the call graph for this function:

unsigned char Image::green ( unsigned  y,
unsigned  x 
) const

Definition at line 112 of file image.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool Image::has_roi ( ) const

Definition at line 161 of file image.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

unsigned Image::height ( ) const

Definition at line 84 of file image.cpp.

Here is the caller graph for this function:

unsigned char Image::m_blue ( int  y,
int  x 
) const

Definition at line 142 of file image.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

unsigned char Image::m_green ( int  y,
int  x 
) const

Definition at line 131 of file image.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

unsigned char Image::m_red ( int  y,
int  x 
) const

Definition at line 120 of file image.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

unsigned Image::n_channels ( ) const [protected]

Definition at line 92 of file image.cpp.

Here is the caller graph for this function:

Image & Image::operator= ( Image  other)

Definition at line 25 of file image.cpp.

Here is the call graph for this function:

const_Row_proxy Image::operator[] ( unsigned  y) const

Returns a const proxy to the yth row of the image.

Parameters:
ythe row to return

Definition at line 192 of file image.cpp.

Here is the call graph for this function:

Row_proxy Image::operator[] ( unsigned  y)

Returns a proxy to the yth row of the image.

Parameters:
ythe row to return

Definition at line 186 of file image.cpp.

Here is the call graph for this function:

void Image::red ( unsigned  y,
unsigned  x,
unsigned char  v 
)

Definition at line 96 of file image.cpp.

Here is the call graph for this function:

unsigned char Image::red ( unsigned  y,
unsigned  x 
) const

Definition at line 108 of file image.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

unsigned Image::rowstride ( ) const [protected]

Definition at line 88 of file image.cpp.

Here is the caller graph for this function:

void Image::save_img ( const std::string &  fp) const

Definition at line 41 of file image.cpp.

Here is the caller graph for this function:

unsigned Image::true_height ( ) const

Definition at line 165 of file image.cpp.

Here is the caller graph for this function:

unsigned Image::true_width ( ) const

Definition at line 169 of file image.cpp.

Here is the caller graph for this function:

void Image::unclip ( )

Definition at line 180 of file image.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

unsigned Image::width ( ) const

Definition at line 80 of file image.cpp.

Here is the caller graph for this function:

unsigned Image::x_win ( ) const

Definition at line 153 of file image.cpp.

Here is the caller graph for this function:

unsigned Image::y_win ( ) const

Definition at line 157 of file image.cpp.

Here is the caller graph for this function:


Friends And Related Function Documentation

friend class const_Pixel_proxy [friend]

Definition at line 175 of file image.hpp.

friend class Pixel_proxy [friend]

Definition at line 174 of file image.hpp.

void swap ( Image lhs,
Image rhs 
) [friend]

Definition at line 30 of file image.cpp.


Member Data Documentation

unsigned Image::clip_dx [protected]

Definition at line 169 of file image.hpp.

unsigned Image::clip_dy [protected]

The region of interest

Definition at line 169 of file image.hpp.

unsigned Image::clip_x [protected]

Definition at line 169 of file image.hpp.

unsigned Image::clip_y [protected]

Definition at line 169 of file image.hpp.

Glib::RefPtr<Gdk::Pixbuf> Image::data [protected]

The image itself

Definition at line 167 of file image.hpp.

bool Image::regionalised [protected]

Definition at line 168 of file image.hpp.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends