SourceXtractorPlusPlus 1.0.3
SourceXtractor++, the next generation SExtractor
Loading...
Searching...
No Matches
SourceXtractor::LockedWriteableImage< T > Class Template Reference

#include <LockedWriteableImage.h>

Inheritance diagram for SourceXtractor::LockedWriteableImage< T >:
Collaboration diagram for SourceXtractor::LockedWriteableImage< T >:

Public Member Functions

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

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

Protected Member Functions

 LockedWriteableImage (std::shared_ptr< WriteableImage< T > > img)

Private Attributes

std::shared_ptr< WriteableImage< T > > m_img
std::lock_guard< std::mutexm_lock

Additional Inherited Members

Public Types inherited from SourceXtractor::Image< T >
using PixelType = T
Public Attributes inherited from SourceXtractor::WriteableImage< T >
std::mutex m_write_mutex

Detailed Description

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

Definition at line 18 of file LockedWriteableImage.h.

Constructor & Destructor Documentation

◆ LockedWriteableImage()

template<typename T>
SourceXtractor::LockedWriteableImage< T >::LockedWriteableImage ( std::shared_ptr< WriteableImage< T > > img)
inlineexplicitprotected

Definition at line 20 of file LockedWriteableImage.h.

References m_img, m_lock, and SourceXtractor::WriteableImage< T >::m_write_mutex.

Referenced by create().

Member Function Documentation

◆ create()

◆ getChunk()

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

Implements SourceXtractor::Image< T >.

Definition at line 45 of file LockedWriteableImage.h.

References m_img.

◆ getHeight()

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

Returns the height of the image in pixels.

Implements SourceXtractor::Image< T >.

Definition at line 37 of file LockedWriteableImage.h.

References m_img.

◆ getRepr()

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

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

Implements SourceXtractor::Image< T >.

Definition at line 29 of file LockedWriteableImage.h.

References m_img.

◆ getWidth()

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

Returns the width of the image in pixels.

Implements SourceXtractor::Image< T >.

Definition at line 33 of file LockedWriteableImage.h.

References m_img.

◆ setValue()

template<typename T>
void SourceXtractor::LockedWriteableImage< T >::setValue ( int x,
int y,
T value )
inlineoverridevirtual

Implements SourceXtractor::WriteableImage< T >.

Definition at line 41 of file LockedWriteableImage.h.

References m_img.

Member Data Documentation

◆ m_img

template<typename T>
std::shared_ptr<WriteableImage<T> > SourceXtractor::LockedWriteableImage< T >::m_img
private

◆ m_lock

template<typename T>
std::lock_guard<std::mutex> SourceXtractor::LockedWriteableImage< T >::m_lock
private

Definition at line 51 of file LockedWriteableImage.h.

Referenced by LockedWriteableImage().


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