SourceXtractorPlusPlus  0.13
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 | Private Member Functions | Private Attributes | List of all members
SourceXtractor::ReplaceUndefImage< T > Class Template Reference

#include <ReplaceUndefImage.h>

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

Public Member Functions

 ~ReplaceUndefImage ()=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...
 
- Public Member Functions inherited from SourceXtractor::ImageBase< T >
virtual ~ImageBase ()
 
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
 
bool isInside (int x, int y) const
 Returns true if the given coordinates are inside the image bounds. More...
 
- 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

static std::shared_ptr
< ReplaceUndefImage< T > > 
create (const std::shared_ptr< VectorImage< T >> &image, T undefined)
 

Private Member Functions

 ReplaceUndefImage (const std::shared_ptr< VectorImage< T >> &image, T invalid)
 

Private Attributes

std::shared_ptr< VectorImage< T > > m_image
 
m_invalid
 

Additional Inherited Members

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

Detailed Description

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

Replace undefined (i.e. masked) values with the average of the closest defined pixel values

Template Parameters
TPixel type

Definition at line 31 of file ReplaceUndefImage.h.

Constructor & Destructor Documentation

template<typename T >
SourceXtractor::ReplaceUndefImage< T >::ReplaceUndefImage ( const std::shared_ptr< VectorImage< T >> &  image,
invalid 
)
private
template<typename T >
SourceXtractor::ReplaceUndefImage< T >::~ReplaceUndefImage ( )
default

Dstructor

Member Function Documentation

template<typename T >
static std::shared_ptr<ReplaceUndefImage<T> > SourceXtractor::ReplaceUndefImage< T >::create ( const std::shared_ptr< VectorImage< T >> &  image,
undefined 
)
inlinestatic

Create an image where filtered values are replaced with the average of the closest neighbors

Parameters
imageImage to "fix"
undefinedValue used as mask
Returns
A new image

Definition at line 50 of file ReplaceUndefImage.h.

References SourceXtractor::ReplaceUndefImage< T >::ReplaceUndefImage().

Here is the call graph for this function:

template<typename T >
int SourceXtractor::ReplaceUndefImage< T >::getHeight ( ) const
finalvirtual

Returns the height of the image in pixels.

Implements SourceXtractor::Image< T >.

Definition at line 38 of file ReplaceUndefImage.cpp.

template<typename T >
std::string SourceXtractor::ReplaceUndefImage< T >::getRepr ( ) const
finalvirtual

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

Implements SourceXtractor::Image< T >.

Definition at line 28 of file ReplaceUndefImage.cpp.

template<typename T >
T SourceXtractor::ReplaceUndefImage< T >::getValue ( int  x,
int  y 
) const
finalvirtual

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

Implements SourceXtractor::Image< T >.

Definition at line 43 of file ReplaceUndefImage.cpp.

References std::count(), std::distance(), dx, dy, and std::numeric_limits::max().

Here is the call graph for this function:

template<typename T >
int SourceXtractor::ReplaceUndefImage< T >::getWidth ( ) const
finalvirtual

Returns the width of the image in pixels.

Implements SourceXtractor::Image< T >.

Definition at line 33 of file ReplaceUndefImage.cpp.

Member Data Documentation

template<typename T >
std::shared_ptr<VectorImage<T> > SourceXtractor::ReplaceUndefImage< T >::m_image
private

Definition at line 63 of file ReplaceUndefImage.h.

template<typename T >
T SourceXtractor::ReplaceUndefImage< T >::m_invalid
private

Definition at line 64 of file ReplaceUndefImage.h.


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