Inviwo 0.9.12-pre
Inviwo documentation
|
ImageSampler aids sampling of images using Bi-Linear Interpolation. More...
#include <imagesampler.h>
Public Member Functions | |
ImageSampler (const Layer *layer) | |
ImageSampler (std::shared_ptr< const Layer > layer) | |
ImageSampler (const Image *img) | |
ImageSampler (std::shared_ptr< const Image > sharedImage) | |
ReturnType | sample (double x, double y, CoordinateSpace space) const |
ReturnType | sample (double x, double y) const |
Public Member Functions inherited from inviwo::SpatialSampler< dvec4 > | |
SpatialSampler (const SpatialEntity &spatialEntity, CoordinateSpace space=CoordinateSpace::Data) | |
dvec4 | sample (const dvec3 &pos) const |
dvec4 | sample (const vec3 &pos) const |
dvec4 | sample (const dvec2 &pos) const |
dvec4 | sample (const vec2 &pos) const |
dvec4 | sample (const dvec3 &pos, CoordinateSpace space) const |
dvec4 | sample (const vec3 &pos, CoordinateSpace space) const |
dvec4 | sample (const dvec2 &pos, CoordinateSpace space) const |
dvec4 | sample (const vec2 &pos, CoordinateSpace space) const |
bool | withinBounds (const dvec3 &pos) const |
bool | withinBounds (const vec3 &pos) const |
bool | withinBounds (const dvec2 &pos) const |
bool | withinBounds (const vec2 &pos) const |
bool | withinBounds (const dvec3 &pos, CoordinateSpace space) const |
bool | withinBounds (const vec3 &pos, CoordinateSpace space) const |
bool | withinBounds (const dvec2 &pos, CoordinateSpace space) const |
bool | withinBounds (const vec2 &pos, CoordinateSpace space) const |
mat3 | getBasis () const |
mat4 | getModelMatrix () const |
mat4 | getWorldMatrix () const |
const SpatialCoordinateTransformer & | getCoordinateTransformer () const |
Protected Member Functions | |
virtual ReturnType | sampleDataSpace (const dvec3 &pos) const override |
virtual bool | withinBoundsDataSpace (const dvec3 &pos) const override |
Protected Member Functions inherited from inviwo::SpatialSampler< dvec4 > |
Additional Inherited Members | |
Public Types inherited from inviwo::SpatialSampler< dvec4 > | |
using | type |
Static Public Attributes inherited from inviwo::SpatialSampler< dvec4 > | |
static const unsigned | SpatialDimensions |
Protected Attributes inherited from inviwo::SpatialSampler< dvec4 > | |
CoordinateSpace | space_ |
const SpatialEntity & | spatialEntity_ |
dmat4 | transform_ |
ImageSampler aids sampling of images using Bi-Linear Interpolation.
A helper class to aid sampling of images. Expects the input to be on the range [0 1]. Eg., input of (0,0) will return the color of the bottom left pixel and (1,1) will return then top right pixel. Output values are bi-linear interpolated between the 4 nearest neighbors.
|
inline |
Creates a ImageSampler for the given Layer, does not take ownership of layer
. Use ImageSampler(std::shared_ptr<const Layer>) to ensure that the Layer is available for the lifetime of the ImageSampler
|
inline |
Creates a ImageSampler for the given Image, does not take ownership of ram. Use ImageSampler(std::shared_ptr<const Image>) to ensure that the Image is available for the lifetime of the ImageSampler
|
inline |
Creates a ImageSampler for the given Image. The shared_ptr will ensure that the Image is available for the lifetime of the ImageSampler
|
inline |
x | X coordinate of the position to sample at |
y | Y coordinate of the position to sample at |
|
inline |
Samples the image at the given position using bi-linear interpolation.
x | position to sample at |
y | position to sample at |
space | in what CoordinateSpace x and y is defined in |
|
inlineoverrideprotectedvirtual |
Implements inviwo::SpatialSampler< dvec4 >.
|
inlineoverrideprotectedvirtual |
Implements inviwo::SpatialSampler< dvec4 >.