SourceXtractorPlusPlus  0.15
Please provide a description of the project.
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Attributes | List of all members
SourceXtractor::UniversalImageChunk< T > Class Template Reference

#include <ImageChunk.h>

Inheritance diagram for SourceXtractor::UniversalImageChunk< T >:
[legend]
Collaboration diagram for SourceXtractor::UniversalImageChunk< T >:
[legend]

Public Member Functions

virtual ~UniversalImageChunk ()
 
void setValue (int x, int y, T value)
 
T & at (int x, int y)
 
- Public Member Functions inherited from SourceXtractor::ImageChunk< T >
virtual ~ImageChunk ()
 
std::string getRepr () const override
 
getValue (int x, int y) const
 Returns the value of the pixel with the coordinates (x,y) More...
 
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
 

Static Public Member Functions

template<typename... Args>
static std::shared_ptr< UniversalImageChunk< T > > create (Args &&... args)
 
- Static Public Member Functions inherited from SourceXtractor::ImageChunk< T >
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)
 
- Protected Member Functions inherited from SourceXtractor::ImageChunk< T >
 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

- Protected Attributes inherited from SourceXtractor::ImageChunk< T >
std::shared_ptr< const std::vector< T > > m_data
 
int m_offset
 
int m_stride
 
int m_width
 
int m_height
 

Detailed Description

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

Definition at line 87 of file ImageChunk.h.

Constructor & Destructor Documentation

◆ UniversalImageChunk() [1/4]

template<typename T >
SourceXtractor::UniversalImageChunk< T >::UniversalImageChunk ( ImageChunk< T > &&  chunk)
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().

Here is the call graph for this function:

◆ UniversalImageChunk() [2/4]

template<typename T >
SourceXtractor::UniversalImageChunk< T >::UniversalImageChunk ( const Image< T > *  image,
int  x,
int  y,
int  width,
int  height 
)
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.

Here is the call graph for this function:

◆ UniversalImageChunk() [3/4]

template<typename T >
SourceXtractor::UniversalImageChunk< T >::UniversalImageChunk ( std::vector< T > &&  data,
int  width,
int  height 
)
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().

Here is the call graph for this function:

◆ UniversalImageChunk() [4/4]

template<typename T >
SourceXtractor::UniversalImageChunk< T >::UniversalImageChunk ( int  width,
int  height 
)
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().

Here is the call graph for this function:

◆ ~UniversalImageChunk()

template<typename T >
virtual SourceXtractor::UniversalImageChunk< T >::~UniversalImageChunk ( )
inlinevirtual

Definition at line 146 of file ImageChunk.h.

Member Function Documentation

◆ at()

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

◆ create()

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

◆ setValue()

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

Definition at line 149 of file ImageChunk.h.

References SourceXtractor::ImageChunk< T >::m_stride, x, and y.

Member Data Documentation

◆ m_chunk_vector

template<typename T >
std::shared_ptr<std::vector<T> > SourceXtractor::UniversalImageChunk< T >::m_chunk_vector
private

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