SourceXtractorPlusPlus
0.15
Please provide a description of the project.
|
#include <ImageChunk.h>
Public Member Functions | |
virtual | ~UniversalImageChunk () |
void | setValue (int x, int y, T value) |
T & | at (int x, int y) |
![]() | |
virtual | ~ImageChunk () |
std::string | getRepr () const override |
Get a string identifying this image in a human readable manner. More... | |
T | getValue (int x, int y) const |
Returns the value of the pixel with the coordinates (x,y) More... | |
T | getValue (const PixelCoordinate &coord) const |
int | getWidth () const final |
Returns the width of the image chunk in pixels. More... | |
int | getHeight () const final |
Returns the height of the image chunk in pixels. 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< UniversalImageChunk< T > > | create (Args &&... args) |
![]() | |
static std::shared_ptr< ImageChunk< T > > | create (std::shared_ptr< const std::vector< T >> data, int offset, int width, int height, int stride) |
Protected Member Functions | |
UniversalImageChunk (ImageChunk< T > &&chunk) | |
UniversalImageChunk (const Image< T > *image, int x, int y, int width, int height) | |
UniversalImageChunk (std::vector< T > &&data, int width, int height) | |
UniversalImageChunk (int width, int height) | |
![]() | |
ImageChunk (std::shared_ptr< const std::vector< T >> data, int offset, int width, int height, int stride) | |
Private Attributes | |
std::shared_ptr< std::vector< T > > | m_chunk_vector |
Additional Inherited Members | |
![]() | |
using | PixelType = T |
![]() | |
std::shared_ptr< const std::vector< T > > | m_data |
int | m_offset |
int | m_stride |
int | m_width |
int | m_height |
Definition at line 87 of file ImageChunk.h.
|
inlineprotected |
This move constructor from an ImageChunk uses a dynamic cast, so if the chunk is another universal chunk, we can avoid copying data, and we just move-assign the underlying vector
Definition at line 95 of file ImageChunk.h.
References SourceXtractor::UniversalImageChunk< T >::m_chunk_vector, SourceXtractor::ImageChunk< T >::m_data, SourceXtractor::ImageChunk< T >::m_height, SourceXtractor::ImageChunk< T >::m_stride, SourceXtractor::ImageChunk< T >::m_width, and std::move().
|
inlineprotected |
Definition at line 112 of file ImageChunk.h.
References SourceXtractor::UniversalImageChunk< T >::m_chunk_vector, SourceXtractor::ImageChunk< T >::m_data, std::make_shared(), x, and y.
|
inlineprotected |
Definition at line 125 of file ImageChunk.h.
References SourceXtractor::UniversalImageChunk< T >::m_chunk_vector, SourceXtractor::ImageChunk< T >::m_data, std::make_shared(), and std::move().
|
inlineprotected |
Definition at line 133 of file ImageChunk.h.
References SourceXtractor::UniversalImageChunk< T >::m_chunk_vector, SourceXtractor::ImageChunk< T >::m_data, and std::make_shared().
|
inlinevirtual |
Definition at line 146 of file ImageChunk.h.
|
inline |
Definition at line 153 of file ImageChunk.h.
References SourceXtractor::UniversalImageChunk< T >::m_chunk_vector, SourceXtractor::ImageChunk< T >::m_stride, x, and y.
|
inlinestatic |
Definition at line 142 of file ImageChunk.h.
Referenced by SourceXtractor::FunctionalImage< T, I >::getChunk(), SourceXtractor::MaskedImage< T, M, Operator >::getChunk(), SourceXtractor::BufferedImage< T >::getChunk(), SourceXtractor::MirrorImage< T >::getChunk(), SourceXtractor::PaddedImage< T, CoordinateInterpolation >::getChunk(), SourceXtractor::PaddedImage< T, nullptr >::getChunk(), SourceXtractor::ProcessedImage< T, P >::getChunk(), SourceXtractor::RecenterImage< T >::getChunk(), SourceXtractor::SubImage< T >::getChunk(), SourceXtractor::ThresholdedImage< T >::getChunk(), and SourceXtractor::ConstantImage< T >::getChunk().
|
inline |
Definition at line 149 of file ImageChunk.h.
References SourceXtractor::ImageChunk< T >::m_stride, x, and y.
|
private |
Definition at line 158 of file ImageChunk.h.
Referenced by SourceXtractor::UniversalImageChunk< T >::at(), and SourceXtractor::UniversalImageChunk< T >::UniversalImageChunk().