SourceXtractorPlusPlus  0.10
Please provide a description of the project.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Attributes | List of all members
SourceXtractor::ImageChunk< T > Class Template Reference

#include <Image.h>

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

Public Member Functions

virtual ~ImageChunk ()
 
std::string getRepr () const override
 Get a string identifying this image in a human readable manner. More...
 
getValue (int x, int y) const final
 Returns the value of the pixel with the coordinates (x,y) More...
 
int getWidth () const final
 Returns the width of the image chunk in pixels. More...
 
int getHeight () const final
 Returns the height of the image chunk in pixels. More...
 
virtual 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. More...
 
getValue (PixelCoordinate pc) const
 
- Public Member Functions inherited from std::enable_shared_from_this< ImageChunk< T > >
enable_shared_from_this (T...args)
 
operator= (T...args)
 
shared_from_this (T...args)
 
~enable_shared_from_this (T...args)
 

Static Public Member Functions

static std::shared_ptr
< ImageChunk< T > > 
create (const T *data, int width, int height, int stride, std::shared_ptr< const Image< T >> image=nullptr)
 

Protected Member Functions

 ImageChunk (const T *data, int width, int height, int stride, std::shared_ptr< const Image< T >> image=nullptr)
 
void setDataPtr (const T *data)
 

Private Attributes

const T * m_data
 
int m_stride
 
int m_width
 
int m_height
 
std::shared_ptr< const Image< T > > m_image
 

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 34 of file Image.h.

Constructor & Destructor Documentation

template<typename T>
SourceXtractor::ImageChunk< T >::ImageChunk ( const T *  data,
int  width,
int  height,
int  stride,
std::shared_ptr< const Image< T >>  image = nullptr 
)
inlineprotected

Definition at line 36 of file ImageChunk.h.

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

Definition at line 49 of file ImageChunk.h.

Member Function Documentation

template<typename T>
static std::shared_ptr<ImageChunk<T> > SourceXtractor::ImageChunk< T >::create ( const T *  data,
int  width,
int  height,
int  stride,
std::shared_ptr< const Image< T >>  image = nullptr 
)
inlinestatic
template<typename T>
virtual std::shared_ptr<ImageChunk<T> > SourceXtractor::ImageChunk< T >::getChunk ( int  x,
int  y,
int  width,
int  height 
) const
inlineoverridevirtual

Implements SourceXtractor::Image< T >.

Definition at line 72 of file ImageChunk.h.

References SourceXtractor::ImageChunk< T >::create(), SourceXtractor::ImageChunk< T >::m_data, SourceXtractor::ImageChunk< T >::m_stride, and std::enable_shared_from_this< ImageChunk< T > >::shared_from_this().

Here is the call graph for this function:

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 68 of file ImageChunk.h.

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

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 52 of file ImageChunk.h.

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

Here is the call graph for this function:

template<typename T>
T SourceXtractor::ImageChunk< T >::getValue ( int  x,
int  y 
) const
inlinefinalvirtual
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 63 of file ImageChunk.h.

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

template<typename T>
void SourceXtractor::ImageChunk< T >::setDataPtr ( const T *  data)
inlineprotected

Member Data Documentation

template<typename T>
const T* SourceXtractor::ImageChunk< T >::m_data
private
template<typename T>
int SourceXtractor::ImageChunk< T >::m_height
private
template<typename T>
std::shared_ptr<const Image<T> > SourceXtractor::ImageChunk< T >::m_image
private

Definition at line 89 of file ImageChunk.h.

Referenced by SourceXtractor::ImageChunk< T >::getRepr().

template<typename T>
int SourceXtractor::ImageChunk< T >::m_stride
private
template<typename T>
int SourceXtractor::ImageChunk< T >::m_width
private

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