SourceXtractorPlusPlus
0.15
Please provide a description of the project.
|
Image implementation which keeps the pixel values in memory. More...
#include <VectorImage.h>
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... | |
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. More... | |
virtual std::shared_ptr < ImageChunk< T > > | getChunk (int x, int y, int width, int height) const override |
![]() | |
virtual | ~Image ()=default |
Destructor. More... | |
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. More... | |
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 | |
![]() | |
using | PixelType = T |
![]() | |
std::mutex | m_write_mutex |
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)
T | the type of the pixel values |
Definition at line 52 of file VectorImage.h.
|
inlineprotected |
Definition at line 55 of file VectorImage.h.
References std::make_shared().
|
protecteddefault |
|
inlineprotected |
Definition at line 61 of file VectorImage.h.
References std::make_shared().
|
inlineprotected |
Definition at line 66 of file VectorImage.h.
References SourceXtractor::VectorImage< T >::m_data, std::make_shared(), and std::move().
|
inlineprotected |
Definition at line 73 of file VectorImage.h.
References SourceXtractor::VectorImage< T >::m_data, and std::make_shared().
|
inlineprotected |
Definition at line 83 of file VectorImage.h.
References SourceXtractor::Image< T >::getChunk(), SourceXtractor::Image< T >::getHeight(), SourceXtractor::Image< T >::getWidth(), SourceXtractor::VectorImage< T >::m_height, SourceXtractor::VectorImage< T >::m_width, std::make_shared(), SourceXtractor::VectorImage< T >::setValue(), x, and y.
|
inlineprotected |
Definition at line 95 of file VectorImage.h.
|
virtualdefault |
Destructor.
|
inline |
Definition at line 132 of file VectorImage.h.
References SourceXtractor::VectorImage< T >::m_data, SourceXtractor::VectorImage< T >::m_height, and SourceXtractor::VectorImage< T >::m_width.
Referenced by SourceXtractor::VectorImage< T >::getValue(), and SourceXtractor::VectorImage< T >::setValue().
|
inline |
Definition at line 137 of file VectorImage.h.
References SourceXtractor::VectorImage< T >::m_data, SourceXtractor::VectorImage< T >::m_height, and SourceXtractor::VectorImage< T >::m_width.
|
inlinestatic |
Definition at line 100 of file VectorImage.h.
Referenced by SourceXtractor::SimpleBackgroundAnalyzer::analyzeBackground(), BenchConvolution::benchmark(), SourceXtractor::BgConvolutionImageSource::BgConvolutionImageSource(), SourceXtractor::MoffatModelFittingTask::computeProperties(), SourceXtractor::PsfTask::computeProperties(), SourceXtractor::DetectionFrameGroupStampTask::computeProperties(), SourceXtractor::DetectionFrameSourceStampTask::computeProperties(), SourceXtractor::DirectConvolution< T, TPadding >::convolve(), SourceXtractor::FlexibleModelFittingTask::createImageCopy(), SourceXtractor::FlexibleModelFittingTask::createWeightImage(), SourceXtractor::DirectConvolution< T, TPadding >::DirectConvolution(), ModelFitting::ImageTraits< ImageInterfaceTypePtr >::factory(), ModelFitting::ImageTraits< WriteableInterfaceTypePtr >::factory(), SourceXtractor::PsfPluginConfig::generateGaussianPsf(), BenchBackgroundConvolution::generateImage(), BenchConvolution::generateImage(), SourceXtractor::BgDFTConvolutionImageSource::generateTile(), SourceXtractor::SegmentationConfig::getDefaultFilter(), SourceXtractor::VariablePsfStack::getPsf(), 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(), SourceXtractor::readPsfEx(), and SourceXtractor::ReplaceUndef().
|
inline |
Definition at line 142 of file VectorImage.h.
References std::fill(), and SourceXtractor::VectorImage< T >::m_data.
|
inlineoverridevirtual |
Implements SourceXtractor::Image< T >.
Definition at line 159 of file VectorImage.h.
References SourceXtractor::ImageChunk< T >::create(), SourceXtractor::VectorImage< T >::m_data, and SourceXtractor::VectorImage< T >::m_width.
|
inline |
Definition at line 146 of file VectorImage.h.
References SourceXtractor::VectorImage< T >::m_data.
Referenced by SourceXtractor::getMedian().
|
inline |
Definition at line 150 of file VectorImage.h.
References SourceXtractor::VectorImage< T >::m_data.
|
inlinefinalvirtual |
Returns the height of the image in pixels.
Implements SourceXtractor::Image< T >.
Definition at line 108 of file VectorImage.h.
References SourceXtractor::VectorImage< T >::m_height.
Referenced by SourceXtractor::applyKernel(), SourceXtractor::MedianFilter< T >::getBox(), SourceXtractor::getMaskedValue(), SourceXtractor::VignetArray::initMultiple(), SourceXtractor::VignetArray::initSingle(), SourceXtractor::MedianFilter< T >::operator()(), and SourceXtractor::ReplaceUndef().
|
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().
|
inline |
Definition at line 116 of file VectorImage.h.
References SourceXtractor::VectorImage< T >::at().
Referenced by SourceXtractor::applyKernel(), SourceXtractor::MedianFilter< T >::getBox(), SourceXtractor::getMaskedValue(), SourceXtractor::MultiThresholdNode::getTotalIntensity(), SourceXtractor::VignetArray::initSingle(), and SourceXtractor::MedianFilter< T >::operator()().
|
inline |
Definition at line 120 of file VectorImage.h.
References SourceXtractor::VectorImage< T >::at(), SourceXtractor::PixelCoordinate::m_x, and SourceXtractor::PixelCoordinate::m_y.
|
inlinefinalvirtual |
Returns the width of the image in pixels.
Implements SourceXtractor::Image< T >.
Definition at line 112 of file VectorImage.h.
References SourceXtractor::VectorImage< T >::m_width.
Referenced by SourceXtractor::applyKernel(), SourceXtractor::MedianFilter< T >::getBox(), SourceXtractor::getMaskedValue(), SourceXtractor::VignetArray::initMultiple(), SourceXtractor::VignetArray::initSingle(), SourceXtractor::MedianFilter< T >::operator()(), and SourceXtractor::ReplaceUndef().
|
inlinefinalvirtual |
Implements SourceXtractor::WriteableImage< T >.
Definition at line 124 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().
|
inline |
Definition at line 128 of file VectorImage.h.
References SourceXtractor::PixelCoordinate::m_x, SourceXtractor::PixelCoordinate::m_y, and SourceXtractor::VectorImage< T >::setValue().
|
private |
|
private |
Definition at line 166 of file VectorImage.h.
Referenced by SourceXtractor::VectorImage< T >::at(), SourceXtractor::VectorImage< T >::getHeight(), SourceXtractor::VectorImage< T >::getRepr(), and SourceXtractor::VectorImage< T >::VectorImage().
|
private |