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

#include <FunctionalImage.h>

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

Public Types

using FunctorType = std::function< T(int x, int y)>
 
- Public Types inherited from SourceXtractor::Image< T >
using PixelType = T
 

Public Member Functions

virtual ~FunctionalImage ()=default
 
std::string getRepr () const final
 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 in pixels. More...
 
int getHeight () const final
 Returns the height of the image in pixels. More...
 
std::shared_ptr< ImageChunk< T > > getChunk (int x, int y, int width, int height) const final
 
- Public Member Functions inherited from SourceXtractor::ImageBase< T >
virtual ~ImageBase ()
 
- 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< ImageBase< 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

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

Protected Member Functions

 FunctionalImage (int width, int height, FunctorType functor)
 

Private Attributes

int m_width
 
int m_height
 
FunctorType m_functor
 

Detailed Description

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

Definition at line 31 of file FunctionalImage.h.

Member Typedef Documentation

◆ FunctorType

template<typename T>
using SourceXtractor::FunctionalImage< T >::FunctorType = std::function<T(int x, int y)>

Definition at line 33 of file FunctionalImage.h.

Constructor & Destructor Documentation

◆ FunctionalImage()

template<typename T>
SourceXtractor::FunctionalImage< T >::FunctionalImage ( int  width,
int  height,
FunctorType  functor 
)
inlineprotected

Definition at line 36 of file FunctionalImage.h.

◆ ~FunctionalImage()

template<typename T>
virtual SourceXtractor::FunctionalImage< T >::~FunctionalImage ( )
virtualdefault

Member Function Documentation

◆ create()

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

◆ getChunk()

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

Reimplemented from SourceXtractor::ImageBase< T >.

Definition at line 64 of file FunctionalImage.h.

References SourceXtractor::UniversalImageChunk< T >::create(), SourceXtractor::FunctionalImage< T >::m_functor, std::move(), x, and y.

Here is the call graph for this function:

◆ getHeight()

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

Returns the height of the image in pixels.

Implements SourceXtractor::Image< T >.

Definition at line 60 of file FunctionalImage.h.

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

Referenced by SourceXtractor::BgDFTConvolutionImageSource::generateTile().

◆ getRepr()

template<typename T>
std::string SourceXtractor::FunctionalImage< T >::getRepr ( ) const
inlinefinalvirtual

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

Implements SourceXtractor::Image< T >.

Definition at line 48 of file FunctionalImage.h.

References SourceXtractor::FunctionalImage< T >::m_functor, and std::function::target_type().

Here is the call graph for this function:

◆ getValue()

template<typename T>
T SourceXtractor::FunctionalImage< T >::getValue ( int  x,
int  y 
) const
inlinefinalvirtual

Returns the value of the pixel with the coordinates (x,y)

Implements SourceXtractor::Image< T >.

Definition at line 52 of file FunctionalImage.h.

References SourceXtractor::FunctionalImage< T >::m_functor, x, and y.

Referenced by SourceXtractor::BgDFTConvolutionImageSource::generateTile().

◆ getWidth()

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

Returns the width of the image in pixels.

Implements SourceXtractor::Image< T >.

Definition at line 56 of file FunctionalImage.h.

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

Referenced by SourceXtractor::BgDFTConvolutionImageSource::generateTile().

Member Data Documentation

◆ m_functor

template<typename T>
FunctorType SourceXtractor::FunctionalImage< T >::m_functor
private

◆ m_height

template<typename T>
int SourceXtractor::FunctionalImage< T >::m_height
private

Definition at line 75 of file FunctionalImage.h.

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

◆ m_width

template<typename T>
int SourceXtractor::FunctionalImage< T >::m_width
private

Definition at line 75 of file FunctionalImage.h.

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


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