SourceXtractorPlusPlus  0.14
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 | Protected Member Functions | Private Attributes | List of all members
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 >:
[legend]
Collaboration diagram for SourceXtractor::VectorImage< T >:
[legend]

Public Member Functions

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

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

Protected Member Functions

 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::vector< T > m_data
 

Additional Inherited Members

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

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 53 of file VectorImage.h.

Constructor & Destructor Documentation

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

Definition at line 56 of file VectorImage.h.

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

Definition at line 60 of file VectorImage.h.

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

Here is the call graph for this function:

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 67 of file VectorImage.h.

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

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

Definition at line 76 of file VectorImage.h.

References SourceXtractor::Image< T >::getValue(), SourceXtractor::VectorImage< T >::m_height, SourceXtractor::VectorImage< T >::m_width, SourceXtractor::VectorImage< T >::setValue(), x, and y.

Here is the call graph for this function:

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

Definition at line 85 of file VectorImage.h.

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

Destructor.

Member Function Documentation

template<typename T>
T& SourceXtractor::VectorImage< T >::at ( int  x,
int  y 
)
inline
template<typename T>
template<typename... Args>
static std::shared_ptr<VectorImage<T> > SourceXtractor::VectorImage< T >::create ( Args &&...  args)
inlinestatic

Definition at line 89 of file VectorImage.h.

Referenced by SourceXtractor::SEBackgroundLevelAnalyzer::analyzeBackground(), SourceXtractor::SimpleBackgroundAnalyzer::analyzeBackground(), BenchConvolution::benchmark(), SourceXtractor::BgConvolutionImageSource::BgConvolutionImageSource(), SourceXtractor::MoffatModelFittingTask::computeProperties(), SourceXtractor::PsfTask::computeProperties(), SourceXtractor::DetectionFrameSourceStampTask::computeProperties(), SourceXtractor::DetectionFrameGroupStampTask::computeProperties(), SourceXtractor::DirectConvolution< T, TPadding >::convolve(), 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::ProcessedImage< T, P >::getChunk(), SourceXtractor::SegmentationConfig::getDefaultFilter(), SourceXtractor::VariablePsf::getPsf(), SourceXtractor::ImagePsf::getScaledKernel(), SourceXtractor::ImageMode< T >::ImageMode(), SourceXtractor::ImageTileWithType< T >::ImageTileWithType(), SourceXtractor::SegmentationConfig::loadASCIIFilter(), TestImage::mainMethod(), SourceXtractor::MedianFilter< T >::operator()(), SourceXtractor::MultiThresholdPartitionStep::partition(), SourceXtractor::readImage(), and SourceXtractor::readPsfEx().

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

Definition at line 123 of file VectorImage.h.

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

Here is the call graph for this function:

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

Reimplemented from SourceXtractor::ImageBase< T >.

Definition at line 140 of file VectorImage.h.

References SourceXtractor::ImageChunk< T >::create(), SourceXtractor::VectorImage< T >::m_data, SourceXtractor::VectorImage< T >::m_width, and std::enable_shared_from_this< ImageBase< T > >::shared_from_this().

Here is the call graph for this function:

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

Definition at line 127 of file VectorImage.h.

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

Referenced by SourceXtractor::getMedian().

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

Definition at line 131 of file VectorImage.h.

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

template<typename T>
int SourceXtractor::VectorImage< T >::getHeight ( ) const
inlinefinalvirtual
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 93 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:

template<typename T>
T SourceXtractor::VectorImage< 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 106 of file VectorImage.h.

References SourceXtractor::VectorImage< T >::at(), x, and y.

Referenced by SourceXtractor::applyKernel(), and SourceXtractor::VignetArray::initSingle().

Here is the call graph for this function:

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

Implements SourceXtractor::WriteableImage< T >.

Definition at line 110 of file VectorImage.h.

References SourceXtractor::VectorImage< T >::at(), x, and y.

Referenced by SourceXtractor::MedianFilter< T >::operator()(), SourceXtractor::ImageMode< T >::processCell(), SourceXtractor::VectorImage< T >::setValue(), and SourceXtractor::VectorImage< T >::VectorImage().

Here is the call graph for this function:

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

Definition at line 114 of file VectorImage.h.

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

Here is the call graph for this function:

Member Data Documentation

template<typename T>
std::vector<T> SourceXtractor::VectorImage< T >::m_data
private
template<typename T>
int SourceXtractor::VectorImage< T >::m_height
private
template<typename T>
int SourceXtractor::VectorImage< T >::m_width
private

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