SourceXtractorPlusPlus 0.21
SourceXtractor++, the next generation SExtractor
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
SourceXtractor::ImageChunk< T > Class Template Reference

#include <ImageChunk.h>

Inheritance diagram for SourceXtractor::ImageChunk< T >:
Inheritance graph
[legend]
Collaboration diagram for SourceXtractor::ImageChunk< T >:
Collaboration graph
[legend]

Public Member Functions

virtual ~ImageChunk ()
 
std::string getRepr () const override
 Get a string identifying this image in a human readable manner.
 
getValue (int x, int y) const
 Returns the value of the pixel with the coordinates (x,y)
 
getValue (const PixelCoordinate &coord) const
 
int getWidth () const final
 Returns the width of the image chunk in pixels.
 
int getHeight () const final
 Returns the height of the image chunk in pixels.
 
std::shared_ptr< ImageChunk< T > > getChunk (int x, int y, int width, int height) const override
 
- Public Member Functions inherited from SourceXtractor::Image< T >
virtual ~Image ()=default
 Destructor.
 
std::shared_ptr< ImageChunk< T > > getChunk (const PixelCoordinate &start, const PixelCoordinate &end) const
 
bool isInside (int x, int y) const
 Returns true if the given coordinates are inside the image bounds.
 

Static Public Member Functions

static std::shared_ptr< ImageChunk< T > > create (std::shared_ptr< const std::vector< T > > data, int offset, int width, int height, int stride)
 

Protected Member Functions

 ImageChunk (std::shared_ptr< const std::vector< T > > data, int offset, int width, int height, int stride)
 

Protected Attributes

std::shared_ptr< const std::vector< T > > m_data
 
int m_offset
 
int m_stride
 
int m_width
 
int m_height
 

Additional Inherited Members

- Public Types inherited from SourceXtractor::Image< T >
using PixelType = T
 

Detailed Description

template<typename T>
class SourceXtractor::ImageChunk< T >

Definition at line 36 of file ImageChunk.h.

Constructor & Destructor Documentation

◆ ImageChunk()

template<typename T >
SourceXtractor::ImageChunk< T >::ImageChunk ( std::shared_ptr< const std::vector< T > > data,
int offset,
int width,
int height,
int stride )
inlineprotected

Definition at line 38 of file ImageChunk.h.

◆ ~ImageChunk()

template<typename T >
virtual SourceXtractor::ImageChunk< T >::~ImageChunk ( )
inlinevirtual

Definition at line 50 of file ImageChunk.h.

Member Function Documentation

◆ create()

template<typename T >
static std::shared_ptr< ImageChunk< T > > SourceXtractor::ImageChunk< T >::create ( std::shared_ptr< const std::vector< T > > data,
int offset,
int width,
int height,
int stride )
inlinestatic

◆ getChunk()

template<typename T >
std::shared_ptr< ImageChunk< T > > SourceXtractor::ImageChunk< T >::getChunk ( int x,
int y,
int width,
int height ) const
inlineoverridevirtual

◆ getHeight()

template<typename T >
int SourceXtractor::ImageChunk< T >::getHeight ( ) const
inlinefinalvirtual

Returns the height of the image chunk in pixels.

Implements SourceXtractor::Image< T >.

Definition at line 74 of file ImageChunk.h.

References SourceXtractor::ImageChunk< T >::m_height.

◆ getRepr()

template<typename T >
std::string SourceXtractor::ImageChunk< T >::getRepr ( ) const
inlineoverridevirtual

Get a string identifying this image in a human readable manner.

Implements SourceXtractor::Image< T >.

Definition at line 53 of file ImageChunk.h.

References SourceXtractor::ImageChunk< T >::m_height, SourceXtractor::ImageChunk< T >::m_width, and std::to_string().

Here is the call graph for this function:

◆ getValue() [1/2]

template<typename T >
T SourceXtractor::ImageChunk< T >::getValue ( const PixelCoordinate & coord) const
inline

◆ getValue() [2/2]

template<typename T >
T SourceXtractor::ImageChunk< T >::getValue ( int x,
int y ) const
inline

◆ getWidth()

template<typename T >
int SourceXtractor::ImageChunk< T >::getWidth ( ) const
inlinefinalvirtual

Returns the width of the image chunk in pixels.

Implements SourceXtractor::Image< T >.

Definition at line 69 of file ImageChunk.h.

References SourceXtractor::ImageChunk< T >::m_width.

Member Data Documentation

◆ m_data

template<typename T >
std::shared_ptr<const std::vector<T> > SourceXtractor::ImageChunk< T >::m_data
protected

◆ m_height

template<typename T >
int SourceXtractor::ImageChunk< T >::m_height
protected

◆ m_offset

template<typename T >
int SourceXtractor::ImageChunk< T >::m_offset
protected

◆ m_stride

template<typename T >
int SourceXtractor::ImageChunk< T >::m_stride
protected

◆ m_width

template<typename T >
int SourceXtractor::ImageChunk< T >::m_width
protected

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