tesseract v5.3.3.20231005
tesseract::Image Class Reference

#include <image.h>

Public Member Functions

 Image ()=default
 
 Image (Pix *pix)
 
bool operator== (decltype(nullptr)) const
 
bool operator!= (decltype(nullptr)) const
 
 operator bool () const
 
 operator Pix * () const
 
 operator Pix ** ()
 
Pix * operator-> () const
 
Image clone () const
 
Image copy () const
 
void destroy ()
 
bool isZero () const
 
Image operator| (Image) const
 
Imageoperator|= (Image)
 
Image operator& (Image) const
 
Imageoperator&= (Image)
 

Public Attributes

Pix * pix_ = nullptr
 

Detailed Description

Definition at line 25 of file image.h.

Constructor & Destructor Documentation

◆ Image() [1/2]

tesseract::Image::Image ( )
default

◆ Image() [2/2]

tesseract::Image::Image ( Pix *  pix)
inline

Definition at line 31 of file image.h.

31: pix_(pix) {}
Pix * pix_
Definition: image.h:27

Member Function Documentation

◆ clone()

Image tesseract::Image::clone ( ) const

Definition at line 24 of file image.cpp.

24 {
25 return pix_ ? pixClone(pix_) : nullptr;
26}

◆ copy()

Image tesseract::Image::copy ( ) const

Definition at line 28 of file image.cpp.

28 {
29 return pixCopy(nullptr, pix_);
30}

◆ destroy()

void tesseract::Image::destroy ( )

Definition at line 32 of file image.cpp.

32 {
33 pixDestroy(&pix_);
34}

◆ isZero()

bool tesseract::Image::isZero ( ) const

Definition at line 36 of file image.cpp.

36 {
37 l_int32 r = 0;
38 pixZero(pix_, &r);
39 return r == 1;
40}

◆ operator bool()

tesseract::Image::operator bool ( ) const
inlineexplicit

Definition at line 36 of file image.h.

36{ return pix_ != nullptr; }

◆ operator Pix *()

tesseract::Image::operator Pix * ( ) const
inline

Definition at line 37 of file image.h.

37{ return pix_; }

◆ operator Pix **()

tesseract::Image::operator Pix ** ( )
inlineexplicit

Definition at line 38 of file image.h.

38{ return &pix_; }

◆ operator!=()

bool tesseract::Image::operator!= ( decltype(nullptr)  ) const
inline

Definition at line 35 of file image.h.

35{ return pix_ != nullptr; }

◆ operator&()

Image tesseract::Image::operator& ( Image  i) const

Definition at line 51 of file image.cpp.

51 {
52 return pixAnd(nullptr, pix_, i);
53}

◆ operator&=()

Image & tesseract::Image::operator&= ( Image  i)

Definition at line 55 of file image.cpp.

55 {
56 pixAnd(pix_, pix_, i);
57 return *this;
58}

◆ operator->()

Pix * tesseract::Image::operator-> ( ) const
inline

Definition at line 39 of file image.h.

39{ return pix_; }

◆ operator==()

bool tesseract::Image::operator== ( decltype(nullptr)  ) const
inline

Definition at line 34 of file image.h.

34{ return pix_ == nullptr; }

◆ operator|()

Image tesseract::Image::operator| ( Image  i) const

Definition at line 42 of file image.cpp.

42 {
43 return pixOr(nullptr, pix_, i);
44}

◆ operator|=()

Image & tesseract::Image::operator|= ( Image  i)

Definition at line 46 of file image.cpp.

46 {
47 pixOr(pix_, pix_, i);
48 return *this;
49}

Member Data Documentation

◆ pix_

Pix* tesseract::Image::pix_ = nullptr

Definition at line 27 of file image.h.


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