SourceXtractorPlusPlus
0.15
Please provide a description of the project.
|
#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 |
![]() | |
ImageSource () | |
virtual | ~ImageSource ()=default |
virtual const std::map< std::string, MetadataEntry > | getMetadata () const |
virtual void | setMetadata (std::string, MetadataEntry) |
Private Attributes | |
std::shared_ptr< Image< T > > | m_image |
int | m_width |
int | m_height |
Euclid::MathUtils::InterpolationType | m_interpolation_type |
std::vector< std::unique_ptr< Euclid::MathUtils::Function > > | m_interpolated_cols |
std::vector< double > | m_x_coords |
double | m_wscale |
double | m_hscale |
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(), Euclid::MathUtils::CUBIC_SPLINE, std::vector< T >::emplace_back(), std::floor(), SourceXtractor::ImageAccessor< T >::getValue(), Euclid::MathUtils::interpolate(), Euclid::MathUtils::LINEAR, 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 >::reserve(), 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().