tesseract 4.1.1
Loading...
Searching...
No Matches
tesseract::StaticShape Class Reference

#include <static_shape.h>

Public Member Functions

 StaticShape ()
 
int batch () const
 
void set_batch (int value)
 
int height () const
 
void set_height (int value)
 
int width () const
 
void set_width (int value)
 
int depth () const
 
void set_depth (int value)
 
LossType loss_type () const
 
void set_loss_type (LossType value)
 
void SetShape (int batch, int height, int width, int depth)
 
void Print () const
 
bool DeSerialize (TFile *fp)
 
bool Serialize (TFile *fp) const
 

Detailed Description

Definition at line 38 of file static_shape.h.

Constructor & Destructor Documentation

◆ StaticShape()

tesseract::StaticShape::StaticShape ( )
inline

Definition at line 40 of file static_shape.h.

41 : batch_(0), height_(0), width_(0), depth_(0), loss_type_(LT_NONE) {}

Member Function Documentation

◆ batch()

int tesseract::StaticShape::batch ( ) const
inline

Definition at line 42 of file static_shape.h.

42{ return batch_; }

◆ depth()

int tesseract::StaticShape::depth ( ) const
inline

Definition at line 48 of file static_shape.h.

48{ return depth_; }

◆ DeSerialize()

bool tesseract::StaticShape::DeSerialize ( TFile fp)
inline

Definition at line 64 of file static_shape.h.

64 {
65 int32_t tmp = LT_NONE;
66 bool result =
67 fp->DeSerialize(&batch_) &&
68 fp->DeSerialize(&height_) &&
69 fp->DeSerialize(&width_) &&
70 fp->DeSerialize(&depth_) &&
71 fp->DeSerialize(&tmp);
72 loss_type_ = static_cast<LossType>(tmp);
73 return result;
74 }

◆ height()

int tesseract::StaticShape::height ( ) const
inline

Definition at line 44 of file static_shape.h.

44{ return height_; }

◆ loss_type()

LossType tesseract::StaticShape::loss_type ( ) const
inline

Definition at line 50 of file static_shape.h.

50{ return loss_type_; }

◆ Print()

void tesseract::StaticShape::Print ( ) const
inline

Definition at line 59 of file static_shape.h.

59 {
60 tprintf("Batch=%d, Height=%d, Width=%d, Depth=%d, loss=%d\n", batch_,
61 height_, width_, depth_, loss_type_);
62 }
DLLSYM void tprintf(const char *format,...)
Definition: tprintf.cpp:35

◆ Serialize()

bool tesseract::StaticShape::Serialize ( TFile fp) const
inline

Definition at line 76 of file static_shape.h.

76 {
77 int32_t tmp = loss_type_;
78 return
79 fp->Serialize(&batch_) &&
80 fp->Serialize(&height_) &&
81 fp->Serialize(&width_) &&
82 fp->Serialize(&depth_) &&
83 fp->Serialize(&tmp);
84 }

◆ set_batch()

void tesseract::StaticShape::set_batch ( int  value)
inline

Definition at line 43 of file static_shape.h.

43{ batch_ = value; }

◆ set_depth()

void tesseract::StaticShape::set_depth ( int  value)
inline

Definition at line 49 of file static_shape.h.

49{ depth_ = value; }

◆ set_height()

void tesseract::StaticShape::set_height ( int  value)
inline

Definition at line 45 of file static_shape.h.

45{ height_ = value; }

◆ set_loss_type()

void tesseract::StaticShape::set_loss_type ( LossType  value)
inline

Definition at line 51 of file static_shape.h.

51{ loss_type_ = value; }

◆ set_width()

void tesseract::StaticShape::set_width ( int  value)
inline

Definition at line 47 of file static_shape.h.

47{ width_ = value; }

◆ SetShape()

void tesseract::StaticShape::SetShape ( int  batch,
int  height,
int  width,
int  depth 
)
inline

Definition at line 52 of file static_shape.h.

52 {
53 batch_ = batch;
54 height_ = height;
55 width_ = width;
56 depth_ = depth;
57 }

◆ width()

int tesseract::StaticShape::width ( ) const
inline

Definition at line 46 of file static_shape.h.

46{ return width_; }

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