|
| Layer (size2_t defaultDimensions=LayerConfig::defaultDimensions, const DataFormatBase *defaultFormat=LayerConfig::defaultFormat, LayerType type=LayerConfig::defaultType, const SwizzleMask &defaultSwizzleMask=LayerConfig::defaultSwizzleMask, InterpolationType interpolation=LayerConfig::defaultInterpolation, const Wrapping2D &wrapping=LayerConfig::defaultWrapping) |
|
| Layer (const LayerConfig &config) |
|
| Layer (std::shared_ptr< LayerRepresentation >) |
|
| Layer (const Layer &)=default |
|
| Layer (Layer &&)=default |
|
Layer & | operator= (const Layer &that)=default |
|
Layer & | operator= (Layer &&that)=default |
|
virtual Layer * | clone () const override |
|
| Layer (const Layer &rhs, NoData noData, const LayerConfig &config={}) |
|
LayerType | getLayerType () const |
|
virtual void | setDimensions (const size2_t &dim) |
|
virtual size2_t | getDimensions () const override |
|
void | setDataFormat (const DataFormatBase *format) |
|
const DataFormatBase * | getDataFormat () const |
|
void | setSwizzleMask (const SwizzleMask &mask) |
| update the swizzle mask of the channels for sampling color layers The swizzle mask is only affecting Color layers.
|
|
SwizzleMask | getSwizzleMask () const |
|
void | setInterpolation (InterpolationType interpolation) |
|
InterpolationType | getInterpolation () const |
|
void | setWrapping (const Wrapping2D &wrapping) |
|
Wrapping2D | getWrapping () const |
|
std::unique_ptr< std::vector< unsigned char > > | getAsCodedBuffer (const std::string &fileExtension) const |
| encode the layer contents to a buffer considering the requested image format
|
|
vec2 | getWorldSpaceGradientSpacing () const |
| Computes the spacing to be used for gradient computation. Also works for layers with non-orthogonal basis.
|
|
virtual const Axis * | getAxis (size_t index) const override |
|
LayerConfig | config () const |
|
HistogramCache::Result | calculateHistograms (const std::function< void(const std::vector< Histogram1D > &)> &whenDone) const |
|
void | discardHistograms () |
|
const T * | getRepresentation () const |
|
std::shared_ptr< const T > | getRepresentationShared () const |
|
T * | getEditableRepresentation () |
|
bool | hasRepresentation () const |
|
bool | hasRepresentations () const |
|
void | addRepresentation (std::shared_ptr< LayerRepresentation > representation) |
|
void | removeRepresentation (const LayerRepresentation *representation) |
|
void | removeOtherRepresentations (const LayerRepresentation *representation) |
|
void | clearRepresentations () |
|
void | invalidateAllOther (const LayerRepresentation *repr) |
|
void | updateResource (const ResourceMeta &meta) const |
|
| StructuredGridEntity (const StructuredGridEntity< N > &rhs)=default |
|
| StructuredGridEntity (const glm::vec< N, size_t > &dimensions, const glm::vec< N, float > &spacing) |
|
| StructuredGridEntity (const mat4 &modelMatrix) |
|
| StructuredGridEntity (const mat4 &modelMatrix, const mat4 &worldMatrix) |
|
StructuredGridEntity< N > & | operator= (const StructuredGridEntity< N > &that)=default |
|
glm::mat4 | getIndexMatrix () const |
|
virtual const StructuredCoordinateTransformer & | getCoordinateTransformer () const override |
|
virtual const StructuredCameraCoordinateTransformer & | getCoordinateTransformer (const Camera &camera) const override |
|
| SpatialEntity (const glm::mat4 &modelMatrix) |
|
| SpatialEntity (const glm::mat4 &modelMatrix, const glm::mat4 &worldMatrix) |
|
| SpatialEntity (const SpatialEntity &rhs) |
|
SpatialEntity & | operator= (const SpatialEntity &that) |
|
glm::vec3 | getOffset () const |
|
void | setOffset (const glm::vec3 &offset) |
|
glm::mat3 | getBasis () const |
|
void | setBasis (const glm::mat3 &basis) |
|
glm::mat4 | getModelMatrix () const |
|
void | setModelMatrix (const glm::mat4 &modelMatrix) |
|
glm::mat4 | getWorldMatrix () const |
|
void | setWorldMatrix (const glm::mat4 &worldMatrix) |
|
vec2 inviwo::Layer::getWorldSpaceGradientSpacing |
( |
| ) |
const |
Computes the spacing to be used for gradient computation. Also works for layers with non-orthogonal basis.
For orthogonal lattices this will be equal to the world space texel spacing. For non-orthogonal lattices it will be the longer of the axes projected onto the world space axes.
World space
b ^ ^
/ |
y ^ / dy | / texel | | /__________>a \/ | <-—dx---> |____________> x
The actual gradient spacing vectors are given by mat2{ gradientSpacing.x, 0, 0, gradientSpacing.y } However, we do not return the zeroes.
To get the spacing in texture space use: mat3{glm::scale(worldToTextureMatrix, vec3{getWorldSpaceGradientSpacing(), 1.0f})};
- Returns
- Step size for gradient computation in world space.