|
SourceXtractorPlusPlus
0.12
Please provide a description of the project.
|
#include <ScaledImageSource.h>
Public Types | |
| enum | InterpolationType { InterpolationType::BILINEAR, InterpolationType::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< T > > | getImageTile (int x, int y, int width, int height) const final |
| void | saveTile (ImageTile< T > &) final |
| int | getWidth () const final |
| int | getHeight () const final |
Public Member Functions inherited from SourceXtractor::ImageSource< T > | |
| ImageSource () | |
| virtual | ~ImageSource ()=default |
Public Member Functions inherited from SourceXtractor::ImageSourceBase | |
| virtual | ~ImageSourceBase ()=default |
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 34 of file ScaledImageSource.h.
|
strong |
Interpolation type: bilinear or bicubic.
| Enumerator | |
|---|---|
| BILINEAR | |
| BICUBIC | |
Definition at line 37 of file ScaledImageSource.h.
|
inline |
Constructor
| image | Image to upscale |
| width | New width |
| height | New height |
| interp_type | Interpolation type |
Definition at line 52 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(), 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< T >.
Definition at line 149 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< T >.
Definition at line 115 of file ScaledImageSource.h.
References 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::ImageSourceBase.
Definition at line 98 of file ScaledImageSource.h.
|
inlinefinalvirtual |
Implements SourceXtractor::ImageSource< T >.
Definition at line 142 of file ScaledImageSource.h.
References SourceXtractor::ScaledImageSource< T >::m_width.
|
inlinefinalvirtual |
A tile of this type can not be saved
Implements SourceXtractor::ImageSource< T >.
Definition at line 135 of file ScaledImageSource.h.
|
private |
Definition at line 155 of file ScaledImageSource.h.
Referenced by SourceXtractor::ScaledImageSource< T >::getHeight().
|
private |
Definition at line 159 of file ScaledImageSource.h.
Referenced by SourceXtractor::ScaledImageSource< T >::ScaledImageSource().
|
private |
Definition at line 154 of file ScaledImageSource.h.
|
private |
Definition at line 157 of file ScaledImageSource.h.
Referenced by SourceXtractor::ScaledImageSource< T >::getImageTile(), and SourceXtractor::ScaledImageSource< T >::ScaledImageSource().
|
private |
Definition at line 156 of file ScaledImageSource.h.
Referenced by SourceXtractor::ScaledImageSource< T >::getImageTile(), and SourceXtractor::ScaledImageSource< T >::ScaledImageSource().
|
private |
Definition at line 155 of file ScaledImageSource.h.
Referenced by SourceXtractor::ScaledImageSource< T >::getWidth().
|
private |
Definition at line 159 of file ScaledImageSource.h.
Referenced by SourceXtractor::ScaledImageSource< T >::ScaledImageSource().
|
private |
Definition at line 158 of file ScaledImageSource.h.
Referenced by SourceXtractor::ScaledImageSource< T >::getImageTile(), and SourceXtractor::ScaledImageSource< T >::ScaledImageSource().
1.8.14