SourceXtractorPlusPlus  0.15
Please provide a description of the project.
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
SourceXtractor::ClippedImage< T > Class Template Reference

#include <ClippedImage.h>

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

Public Member Functions

std::string getRepr () const override
 Get a string identifying this image in a human readable manner. More...
 
int getWidth () const override
 Returns the width of the image in pixels. More...
 
int getHeight () const override
 Returns the height of the image in pixels. More...
 
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...
 
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. More...
 

Static Public Member Functions

template<typename ... Args>
static std::shared_ptr< ClippedImage< T > > create (Args &&...args)
 

Private Member Functions

 ClippedImage (std::shared_ptr< const Image< T >> img, int x, int y, int w, int h)
 

Private Attributes

std::shared_ptr< const Image< T > > m_img
 
int m_clip_x
 
int m_clip_y
 
int m_clip_w
 
int m_clip_h
 

Additional Inherited Members

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

Detailed Description

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

Clip an image

Template Parameters
TPixel type

Definition at line 31 of file ClippedImage.h.

Constructor & Destructor Documentation

◆ ClippedImage()

template<typename T >
SourceXtractor::ClippedImage< T >::ClippedImage ( std::shared_ptr< const Image< T >>  img,
int  x,
int  y,
int  w,
int  h 
)
inlineprivate

Constructor

Parameters
imgImage to decorate
xNew x start coordinate
yNew y start coordinate
wNew width
hNew height

Definition at line 47 of file ClippedImage.h.

Member Function Documentation

◆ create()

template<typename T >
template<typename ... Args>
static std::shared_ptr<ClippedImage<T> > SourceXtractor::ClippedImage< T >::create ( Args &&...  args)
inlinestatic

◆ getChunk()

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

◆ getHeight()

template<typename T >
int SourceXtractor::ClippedImage< T >::getHeight ( ) const
inlineoverridevirtual

Returns the height of the image in pixels.

Implements SourceXtractor::Image< T >.

Definition at line 68 of file ClippedImage.h.

References SourceXtractor::ClippedImage< T >::m_clip_h.

◆ getRepr()

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

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

Implements SourceXtractor::Image< T >.

Definition at line 60 of file ClippedImage.h.

References SourceXtractor::ClippedImage< T >::m_img.

◆ getWidth()

template<typename T >
int SourceXtractor::ClippedImage< T >::getWidth ( ) const
inlineoverridevirtual

Returns the width of the image in pixels.

Implements SourceXtractor::Image< T >.

Definition at line 64 of file ClippedImage.h.

References SourceXtractor::ClippedImage< T >::m_clip_w.

Member Data Documentation

◆ m_clip_h

template<typename T >
int SourceXtractor::ClippedImage< T >::m_clip_h
private

Definition at line 79 of file ClippedImage.h.

Referenced by SourceXtractor::ClippedImage< T >::getHeight().

◆ m_clip_w

template<typename T >
int SourceXtractor::ClippedImage< T >::m_clip_w
private

Definition at line 79 of file ClippedImage.h.

Referenced by SourceXtractor::ClippedImage< T >::getWidth().

◆ m_clip_x

template<typename T >
int SourceXtractor::ClippedImage< T >::m_clip_x
private

Definition at line 78 of file ClippedImage.h.

Referenced by SourceXtractor::ClippedImage< T >::getChunk().

◆ m_clip_y

template<typename T >
int SourceXtractor::ClippedImage< T >::m_clip_y
private

Definition at line 78 of file ClippedImage.h.

Referenced by SourceXtractor::ClippedImage< T >::getChunk().

◆ m_img

template<typename T >
std::shared_ptr<const Image<T> > SourceXtractor::ClippedImage< T >::m_img
private

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