Main MRPT website > C++ reference for MRPT 1.4.0
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Friends
mrpt::obs::CObservation3DRangeScan::TPixelLabelInfoBase Struct Referenceabstract

Detailed Description

Virtual interface to all pixel-label information structs.

See CObservation3DRangeScan::pixelLabels

Definition at line 305 of file obs/CObservation3DRangeScan.h.

#include <mrpt/obs/CObservation3DRangeScan.h>

Inheritance diagram for mrpt::obs::CObservation3DRangeScan::TPixelLabelInfoBase:
Inheritance graph

Public Types

typedef std::map< uint32_t, std::string > TMapLabelID2Name
 

Public Member Functions

const std::string & getLabelName (unsigned int label_idx) const
 
void setLabelName (unsigned int label_idx, const std::string &name)
 
int checkLabelNameExistence (const std::string &name) const
 Check the existence of a label by returning its associated index.
 
virtual void setSize (const int NROWS, const int NCOLS)=0
 Resizes the matrix pixelLabels to the given size, setting all bitfields to zero (that is, all pixels are assigned NONE category).
 
virtual void setLabel (const int row, const int col, uint8_t label_idx)=0
 Mark the pixel(row,col) as classified in the category label_idx, which may be in the range 0 to MAX_NUM_LABELS-1 Note that 0 is a valid label index, it does not mean "no label".
 
virtual void getLabels (const int row, const int col, uint8_t &labels)=0
 
virtual void unsetLabel (const int row, const int col, uint8_t label_idx)=0
 For the pixel(row,col), removes its classification into the category label_idx, which may be in the range 0 to 7 Note that 0 is a valid label index, it does not mean "no label".
 
virtual void unsetAll (const int row, const int col, uint8_t label_idx)=0
 Removes all categories for pixel(row,col)
 
virtual bool checkLabel (const int row, const int col, uint8_t label_idx) const =0
 Checks whether pixel(row,col) has been clasified into category label_idx, which may be in the range 0 to 7.
 
void writeToStream (mrpt::utils::CStream &out) const
 
 TPixelLabelInfoBase (unsigned int BITFIELD_BYTES_)
 
virtual ~TPixelLabelInfoBase ()
 

Static Public Member Functions

static TPixelLabelInfoBasereadAndBuildFromStream (mrpt::utils::CStream &in)
 

Public Attributes

TMapLabelID2Name pixelLabelNames
 The 'semantic' or human-friendly name of the i'th bit in pixelLabels(r,c) can be found in pixelLabelNames[i] as a std::string.
 
const uint8_t BITFIELD_BYTES
 Minimum number of bytes required to hold MAX_NUM_DIFFERENT_LABELS bits.
 

Protected Member Functions

virtual void internal_readFromStream (mrpt::utils::CStream &in)=0
 
virtual void internal_writeToStream (mrpt::utils::CStream &out) const =0
 
virtual void Print (std::ostream &) const =0
 

Friends

std::ostream & operator<< (std::ostream &out, const TPixelLabelInfoBase &obj)
 std stream interface
 

Member Typedef Documentation

◆ TMapLabelID2Name

Definition at line 307 of file obs/CObservation3DRangeScan.h.

Constructor & Destructor Documentation

◆ TPixelLabelInfoBase()

mrpt::obs::CObservation3DRangeScan::TPixelLabelInfoBase::TPixelLabelInfoBase ( unsigned int  BITFIELD_BYTES_)
inline

Definition at line 353 of file obs/CObservation3DRangeScan.h.

◆ ~TPixelLabelInfoBase()

virtual mrpt::obs::CObservation3DRangeScan::TPixelLabelInfoBase::~TPixelLabelInfoBase ( )
inlinevirtual

Definition at line 358 of file obs/CObservation3DRangeScan.h.

Member Function Documentation

◆ checkLabel()

virtual bool mrpt::obs::CObservation3DRangeScan::TPixelLabelInfoBase::checkLabel ( const int  row,
const int  col,
uint8_t  label_idx 
) const
pure virtual

Checks whether pixel(row,col) has been clasified into category label_idx, which may be in the range 0 to 7.

See also
unsetLabel, unsetAll

Implemented in mrpt::obs::CObservation3DRangeScan::TPixelLabelInfo< BYTES_REQUIRED_ >.

◆ checkLabelNameExistence()

int mrpt::obs::CObservation3DRangeScan::TPixelLabelInfoBase::checkLabelNameExistence ( const std::string &  name) const
inline

Check the existence of a label by returning its associated index.

-1 if it does not exist.

Definition at line 320 of file obs/CObservation3DRangeScan.h.

◆ getLabelName()

const std::string & mrpt::obs::CObservation3DRangeScan::TPixelLabelInfoBase::getLabelName ( unsigned int  label_idx) const
inline

Definition at line 312 of file obs/CObservation3DRangeScan.h.

◆ getLabels()

virtual void mrpt::obs::CObservation3DRangeScan::TPixelLabelInfoBase::getLabels ( const int  row,
const int  col,
uint8_t labels 
)
pure virtual

◆ internal_readFromStream()

virtual void mrpt::obs::CObservation3DRangeScan::TPixelLabelInfoBase::internal_readFromStream ( mrpt::utils::CStream in)
protectedpure virtual

◆ internal_writeToStream()

virtual void mrpt::obs::CObservation3DRangeScan::TPixelLabelInfoBase::internal_writeToStream ( mrpt::utils::CStream out) const
protectedpure virtual

◆ Print()

virtual void mrpt::obs::CObservation3DRangeScan::TPixelLabelInfoBase::Print ( std::ostream &  ) const
protectedpure virtual

◆ readAndBuildFromStream()

static TPixelLabelInfoBase * mrpt::obs::CObservation3DRangeScan::TPixelLabelInfoBase::readAndBuildFromStream ( mrpt::utils::CStream in)
static

◆ setLabel()

virtual void mrpt::obs::CObservation3DRangeScan::TPixelLabelInfoBase::setLabel ( const int  row,
const int  col,
uint8_t  label_idx 
)
pure virtual

Mark the pixel(row,col) as classified in the category label_idx, which may be in the range 0 to MAX_NUM_LABELS-1 Note that 0 is a valid label index, it does not mean "no label".

See also
unsetLabel, unsetAll

Implemented in mrpt::obs::CObservation3DRangeScan::TPixelLabelInfo< BYTES_REQUIRED_ >.

◆ setLabelName()

void mrpt::obs::CObservation3DRangeScan::TPixelLabelInfoBase::setLabelName ( unsigned int  label_idx,
const std::string &  name 
)
inline

Definition at line 317 of file obs/CObservation3DRangeScan.h.

◆ setSize()

virtual void mrpt::obs::CObservation3DRangeScan::TPixelLabelInfoBase::setSize ( const int  NROWS,
const int  NCOLS 
)
pure virtual

Resizes the matrix pixelLabels to the given size, setting all bitfields to zero (that is, all pixels are assigned NONE category).

Implemented in mrpt::obs::CObservation3DRangeScan::TPixelLabelInfo< BYTES_REQUIRED_ >.

◆ unsetAll()

virtual void mrpt::obs::CObservation3DRangeScan::TPixelLabelInfoBase::unsetAll ( const int  row,
const int  col,
uint8_t  label_idx 
)
pure virtual

Removes all categories for pixel(row,col)

See also
setLabel, unsetLabel

Implemented in mrpt::obs::CObservation3DRangeScan::TPixelLabelInfo< BYTES_REQUIRED_ >.

◆ unsetLabel()

virtual void mrpt::obs::CObservation3DRangeScan::TPixelLabelInfoBase::unsetLabel ( const int  row,
const int  col,
uint8_t  label_idx 
)
pure virtual

For the pixel(row,col), removes its classification into the category label_idx, which may be in the range 0 to 7 Note that 0 is a valid label index, it does not mean "no label".

See also
setLabel, unsetAll

Implemented in mrpt::obs::CObservation3DRangeScan::TPixelLabelInfo< BYTES_REQUIRED_ >.

◆ writeToStream()

void mrpt::obs::CObservation3DRangeScan::TPixelLabelInfoBase::writeToStream ( mrpt::utils::CStream out) const

Friends And Related Symbol Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream &  out,
const TPixelLabelInfoBase obj 
)
friend

std stream interface

Definition at line 347 of file obs/CObservation3DRangeScan.h.

Member Data Documentation

◆ BITFIELD_BYTES

const uint8_t mrpt::obs::CObservation3DRangeScan::TPixelLabelInfoBase::BITFIELD_BYTES

Minimum number of bytes required to hold MAX_NUM_DIFFERENT_LABELS bits.

Definition at line 360 of file obs/CObservation3DRangeScan.h.

◆ pixelLabelNames

TMapLabelID2Name mrpt::obs::CObservation3DRangeScan::TPixelLabelInfoBase::pixelLabelNames

The 'semantic' or human-friendly name of the i'th bit in pixelLabels(r,c) can be found in pixelLabelNames[i] as a std::string.

Definition at line 310 of file obs/CObservation3DRangeScan.h.




Page generated by Doxygen 1.9.7 for MRPT 1.4.0 SVN: at Tue Jun 13 14:27:49 UTC 2023