|
SourceXtractorPlusPlus 0.21
SourceXtractor++, the next generation SExtractor
|
#include <ScaledImageSource.h>


Public Types | |
| enum class | InterpolationType { BILINEAR , BICUBIC } |
| Interpolation type: bilinear or bicubic. More... | |
Public Member Functions | |
| ScaledImageSource (const std::shared_ptr< Image< T > > &image, int width, int height, InterpolationType interp_type=InterpolationType::BICUBIC) | |
| virtual | ~ScaledImageSource ()=default |
| std::string | getRepr () const final |
| std::shared_ptr< ImageTile > | getImageTile (int x, int y, int width, int height) const final |
| void | saveTile (ImageTile &) final |
| int | getWidth () const final |
| int | getHeight () const final |
| ImageTile::ImageType | getType () const override |
Public Member Functions inherited from SourceXtractor::ImageSource | |
| ImageSource () | |
| virtual | ~ImageSource ()=default |
| virtual const std::map< std::string, MetadataEntry > & | getMetadata () const |
| virtual void | setMetadata (const std::string &key, const MetadataEntry &value) |
Scales an image to a target width and height. Note that the original image grid is centered on the target one, so values on the edges are actually extrapolated.
| T | Pixel type |
Definition at line 35 of file ScaledImageSource.h.
|
strong |
Interpolation type: bilinear or bicubic.
| Enumerator | |
|---|---|
| BILINEAR | |
| BICUBIC | |
Definition at line 38 of file ScaledImageSource.h.
|
inline |
Constructor
| image | Image to upscale |
| width | New width |
| height | New height |
| interp_type | Interpolation type |
Definition at line 53 of file ScaledImageSource.h.
References SourceXtractor::ScaledImageSource< T >::BICUBIC, SourceXtractor::ScaledImageSource< T >::BILINEAR, std::ceil(), std::floor(), Euclid::MathUtils::interpolate(), SourceXtractor::ScaledImageSource< T >::m_hscale, SourceXtractor::ScaledImageSource< T >::m_interpolated_cols, SourceXtractor::ScaledImageSource< T >::m_interpolation_type, SourceXtractor::ScaledImageSource< T >::m_wscale, SourceXtractor::ScaledImageSource< T >::m_x_coords, std::vector< T >::resize(), std::vector< T >::size(), x, and y.

|
virtualdefault |
Destructor
|
inlinefinalvirtual |
Implements SourceXtractor::ImageSource.
Definition at line 152 of file ScaledImageSource.h.
References SourceXtractor::ScaledImageSource< T >::m_height.
|
inlinefinalvirtual |
Get a tile from the scaled image
| x | Tile offset on the X coordinate |
| y | Tile offset on the Y coordinate |
| width | Tile width |
| height | Tile height |
Implements SourceXtractor::ImageSource.
Definition at line 118 of file ScaledImageSource.h.
References SourceXtractor::ImageTile::create(), SourceXtractor::ImageTile::getTypeValue(), Euclid::MathUtils::interpolate(), SourceXtractor::ScaledImageSource< T >::m_interpolated_cols, SourceXtractor::ScaledImageSource< T >::m_interpolation_type, SourceXtractor::ScaledImageSource< T >::m_x_coords, std::vector< T >::size(), x, and y.

|
inlinefinalvirtual |
Implements SourceXtractor::ImageSource.
Definition at line 101 of file ScaledImageSource.h.
|
inlineoverridevirtual |
Implements SourceXtractor::ImageSource.
Definition at line 156 of file ScaledImageSource.h.
References SourceXtractor::ImageTile::getTypeValue().

|
inlinefinalvirtual |
Implements SourceXtractor::ImageSource.
Definition at line 145 of file ScaledImageSource.h.
References SourceXtractor::ScaledImageSource< T >::m_width.
|
inlinefinalvirtual |
A tile of this type can not be saved
Implements SourceXtractor::ImageSource.
Definition at line 138 of file ScaledImageSource.h.
|
private |
Definition at line 162 of file ScaledImageSource.h.
Referenced by SourceXtractor::ScaledImageSource< T >::getHeight().
|
private |
Definition at line 166 of file ScaledImageSource.h.
Referenced by SourceXtractor::ScaledImageSource< T >::ScaledImageSource().
|
private |
Definition at line 161 of file ScaledImageSource.h.
|
private |
Definition at line 164 of file ScaledImageSource.h.
Referenced by SourceXtractor::ScaledImageSource< T >::getImageTile(), and SourceXtractor::ScaledImageSource< T >::ScaledImageSource().
|
private |
Definition at line 163 of file ScaledImageSource.h.
Referenced by SourceXtractor::ScaledImageSource< T >::getImageTile(), and SourceXtractor::ScaledImageSource< T >::ScaledImageSource().
|
private |
Definition at line 162 of file ScaledImageSource.h.
Referenced by SourceXtractor::ScaledImageSource< T >::getWidth().
|
private |
Definition at line 166 of file ScaledImageSource.h.
Referenced by SourceXtractor::ScaledImageSource< T >::ScaledImageSource().
|
private |
Definition at line 165 of file ScaledImageSource.h.
Referenced by SourceXtractor::ScaledImageSource< T >::getImageTile(), and SourceXtractor::ScaledImageSource< T >::ScaledImageSource().