SourceXtractorPlusPlus 0.22
SourceXtractor++, the next generation SExtractor
Loading...
Searching...
No Matches
SourceXtractor::VectorImage< T > Class Template Referencefinal

Image implementation which keeps the pixel values in memory. More...

#include <VectorImage.h>

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

Public Member Functions

std::string getRepr () const final
 Get a string identifying this image in a human readable manner.
 
int getHeight () const final
 Returns the height of the image in pixels.
 
int getWidth () const final
 Returns the width of the image in pixels.
 
T getValue (int x, int y) const
 
T getValue (PixelCoordinate coord) const
 
void setValue (int x, int y, T value) final
 
void setValue (PixelCoordinate pc, T value)
 
T & at (int x, int y)
 
const T & at (int x, int y) const
 
void fillValue (T value)
 
const std::vector< T > & getData () const
 
std::vector< T > & getData ()
 
virtual ~VectorImage ()=default
 Destructor.
 
std::shared_ptr< ImageChunk< T > > getChunk (int x, int y, int width, int height) const override
 
- Public Member Functions inherited from SourceXtractor::WriteableImage< T >
- 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< VectorImage< T > > create (Args &&... args)
 

Protected Member Functions

 VectorImage (const VectorImage< T > &other)
 
 VectorImage (VectorImage< T > &&other)=default
 
 VectorImage (int width, int height)
 
 VectorImage (int width, int height, std::vector< T > data)
 
template<typename Iter >
 VectorImage (int width, int height, Iter data_begin, Iter data_end, typename std::enable_if< std::is_base_of< std::input_iterator_tag, typename std::iterator_traits< Iter >::iterator_category >::value and std::is_same< T, typename std::iterator_traits< Iter >::value_type >::value >::type *=0)
 
 VectorImage (const Image< T > &other_image)
 
 VectorImage (const std::shared_ptr< const Image< T > > &other_image)
 

Private Attributes

int m_width
 
int m_height
 
std::shared_ptr< std::vector< T > > m_data
 

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::VectorImage< T >

Image implementation which keeps the pixel values in memory.

The pixel values are kept in a vector. The first element of the vector is the pixel with coordinate (0,0) and the following elements have increasing x and y indices, with the x index (in the width direction) increasing more rapidly. This means the order of the vector elements should be:

(0,0), (1,0), (2,0), ..., (width-1,0), (0,1), (1,1), ..., (width-1,height-1)

Template Parameters
Tthe type of the pixel values

Definition at line 52 of file VectorImage.h.

Constructor & Destructor Documentation

◆ VectorImage() [1/7]

template<typename T >
SourceXtractor::VectorImage< T >::VectorImage ( const VectorImage< T > & other)
inlineprotected

Definition at line 55 of file VectorImage.h.

Referenced by SourceXtractor::VectorImage< T >::create().

◆ VectorImage() [2/7]

template<typename T >
SourceXtractor::VectorImage< T >::VectorImage ( VectorImage< T > && other)
protecteddefault

◆ VectorImage() [3/7]

template<typename T >
SourceXtractor::VectorImage< T >::VectorImage ( int width,
int height )
inlineprotected

Definition at line 61 of file VectorImage.h.

◆ VectorImage() [4/7]

template<typename T >
SourceXtractor::VectorImage< T >::VectorImage ( int width,
int height,
std::vector< T > data )
inlineprotected

Definition at line 66 of file VectorImage.h.

References SourceXtractor::VectorImage< T >::m_data.

◆ VectorImage() [5/7]

template<typename T >
template<typename Iter >
SourceXtractor::VectorImage< T >::VectorImage ( int width,
int height,
Iter data_begin,
Iter data_end,
typename std::enable_if< std::is_base_of< std::input_iterator_tag, typename std::iterator_traits< Iter >::iterator_category >::value and std::is_same< T, typename std::iterator_traits< Iter >::value_type >::value >::type * = 0 )
inlineprotected

Definition at line 73 of file VectorImage.h.

References SourceXtractor::VectorImage< T >::m_data.

◆ VectorImage() [6/7]

template<typename T >
SourceXtractor::VectorImage< T >::VectorImage ( const Image< T > & other_image)
inlineexplicitprotected

◆ VectorImage() [7/7]

template<typename T >
SourceXtractor::VectorImage< T >::VectorImage ( const std::shared_ptr< const Image< T > > & other_image)
inlineexplicitprotected

Definition at line 95 of file VectorImage.h.

◆ ~VectorImage()

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

Destructor.

Member Function Documentation

◆ at() [1/2]

◆ at() [2/2]

template<typename T >
const T & SourceXtractor::VectorImage< T >::at ( int x,
int y ) const
inline

◆ create()

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

Definition at line 100 of file VectorImage.h.

References std::forward(), and SourceXtractor::VectorImage< T >::VectorImage().

Referenced by SourceXtractor::SimpleBackgroundAnalyzer::analyzeBackground(), BenchConvolution::benchmark(), SourceXtractor::BgConvolutionImageSource::BgConvolutionImageSource(), SourceXtractor::DetectionFrameGroupStampTask::computeProperties(), SourceXtractor::DetectionFrameSourceStampTask::computeProperties(), SourceXtractor::MoffatModelFittingTask::computeProperties(), SourceXtractor::PsfTask::computeProperties(), SourceXtractor::SourcePsfTask::computeProperties(), SourceXtractor::VignetSourceTask::computeProperties(), SourceXtractor::DirectConvolution< T, TPadding >::convolve(), SourceXtractor::FlexibleModelFittingIterativeTask::createDeblendImage(), SourceXtractor::FlexibleModelFittingTask::createImageCopy(), SourceXtractor::FlexibleModelFittingTask::createWeightImage(), ModelFitting::ImageTraits< ImageInterfaceTypePtr >::factory(), ModelFitting::ImageTraits< WriteableInterfaceTypePtr >::factory(), SourceXtractor::PsfPluginConfig::generateGaussianPsf(), BenchBackgroundConvolution::generateImage(), BenchConvolution::generateImage(), SourceXtractor::BgDFTConvolutionImageSource::generateTile(), SourceXtractor::SegmentationConfig::getDefaultFilter(), SourceXtractor::VariablePsf::getPsf(), SourceXtractor::VariablePsfStack::getPsf(), SourceXtractor::ImagePsf::getScaledKernel(), SourceXtractor::ImageMode< T >::ImageMode(), SourceXtractor::ImageTileWithType< T >::ImageTileWithType(), SourceXtractor::SegmentationConfig::loadASCIIFilter(), TestImage::mainMethod(), BenchRendering::measureRasterToImage(), SourceXtractor::NeighbourInfo::NeighbourInfo(), SourceXtractor::MedianFilter< T >::operator()(), SourceXtractor::MultiThresholdPartitionStep::partition(), SourceXtractor::readImage(), SourceXtractor::readPsfEx(), and SourceXtractor::ReplaceUndef().

Here is the call graph for this function:

◆ fillValue()

template<typename T >
void SourceXtractor::VectorImage< T >::fillValue ( T value)
inline

Definition at line 142 of file VectorImage.h.

References std::fill(), and SourceXtractor::VectorImage< T >::m_data.

Here is the call graph for this function:

◆ getChunk()

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

◆ getData() [1/2]

template<typename T >
std::vector< T > & SourceXtractor::VectorImage< T >::getData ( )
inline

Definition at line 150 of file VectorImage.h.

References SourceXtractor::VectorImage< T >::m_data.

◆ getData() [2/2]

template<typename T >
const std::vector< T > & SourceXtractor::VectorImage< T >::getData ( ) const
inline

Definition at line 146 of file VectorImage.h.

References SourceXtractor::VectorImage< T >::m_data.

Referenced by SourceXtractor::getMedian().

◆ getHeight()

◆ getRepr()

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

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

Implements SourceXtractor::Image< T >.

Definition at line 104 of file VectorImage.h.

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

Here is the call graph for this function:

◆ getValue() [1/2]

◆ getValue() [2/2]

template<typename T >
T SourceXtractor::VectorImage< T >::getValue ( PixelCoordinate coord) const
inline

Definition at line 120 of file VectorImage.h.

References SourceXtractor::VectorImage< T >::at(), SourceXtractor::PixelCoordinate::m_x, and SourceXtractor::PixelCoordinate::m_y.

Here is the call graph for this function:

◆ getWidth()

◆ setValue() [1/2]

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

◆ setValue() [2/2]

template<typename T >
void SourceXtractor::VectorImage< T >::setValue ( PixelCoordinate pc,
T value )
inline

Definition at line 128 of file VectorImage.h.

References SourceXtractor::VectorImage< T >::setValue().

Here is the call graph for this function:

Member Data Documentation

◆ m_data

◆ m_height

◆ m_width


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