![]() |
Inviwo 0.9.12-pre
Inviwo documentation
|
#include <volume.h>
Public Types | |
| using | Config = VolumeConfig |
| Public Types inherited from inviwo::Data< Volume, VolumeRepresentation > | |
| using | self |
| using | repr |
Public Member Functions | |
| Volume (size3_t defaultDimensions=VolumeConfig::defaultDimensions, const DataFormatBase *defaultFormat=VolumeConfig::defaultFormat, const SwizzleMask &defaultSwizzleMask=VolumeConfig::defaultSwizzleMask, InterpolationType interpolation=VolumeConfig::defaultInterpolation, const Wrapping3D &wrapping=VolumeConfig::defaultWrapping) | |
| Volume (const VolumeConfig &config) | |
| Volume (std::shared_ptr< VolumeRepresentation >) | |
| Volume (const Volume &rhs, NoData noData, const VolumeConfig &config={}) | |
| Volume (const Volume &)=default | |
| Volume (Volume &&)=default | |
| Volume & | operator= (const Volume &that)=default |
| Volume & | operator= (Volume &&that)=default |
| virtual Volume * | clone () const override |
| Document | getInfo () const |
| virtual void | setDimensions (const size3_t &dim) |
| virtual size3_t | getDimensions () const override |
| void | setDataFormat (const DataFormatBase *format) |
| const DataFormatBase * | getDataFormat () const |
| void | setSwizzleMask (const SwizzleMask &mask) |
| update the swizzle mask of the color channels when sampling the volume | |
| SwizzleMask | getSwizzleMask () const |
| void | setInterpolation (InterpolationType interpolation) |
| InterpolationType | getInterpolation () const |
| void | setWrapping (const Wrapping3D &wrapping) |
| Wrapping3D | getWrapping () const |
| vec3 | getWorldSpaceGradientSpacing () const |
| Computes the spacing to be used for gradient computation. Also works for volume with non-orthogonal basis. | |
| virtual const Axis * | getAxis (size_t index) const override |
| template<typename Kind> | |
| const representation_traits< Volume, Kind >::type * | getRep () const |
| HistogramCache::Result | calculateHistograms (const std::function< void(const std::vector< Histogram1D > &)> &whenDone) const |
| void | discardHistograms () |
| VolumeConfig | config () const |
| Public Member Functions inherited from inviwo::Data< Volume, VolumeRepresentation > | |
| const T * | getRepresentation () const |
| std::shared_ptr< const T > | getRepresentationShared () const |
| T * | getEditableRepresentation () |
| bool | hasRepresentation () const |
| bool | hasRepresentations () const |
| void | addRepresentation (std::shared_ptr< VolumeRepresentation > representation) |
| void | removeRepresentation (const VolumeRepresentation *representation) |
| void | removeOtherRepresentations (const VolumeRepresentation *representation) |
| void | clearRepresentations () |
| void | invalidateAllOther (const VolumeRepresentation *repr) |
| void | updateResource (const ResourceMeta &meta) const |
| Public Member Functions inherited from inviwo::StructuredGridEntity< 3 > | |
| StructuredGridEntity< N > & | operator= (const StructuredGridEntity< N > &that)=default |
| glm::mat4 | getIndexMatrix () const |
| virtual const StructuredCoordinateTransformer & | getCoordinateTransformer () const override |
| Public Member Functions inherited from inviwo::SpatialEntity | |
| 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) |
| virtual const SpatialCameraCoordinateTransformer & | getCoordinateTransformer (const Camera &camera) const |
| Public Member Functions inherited from inviwo::MetaDataOwner | |
| MetaDataOwner (const MetaDataOwner &rhs)=default | |
| MetaDataOwner (MetaDataOwner &rhs)=default | |
| MetaDataOwner & | operator= (const MetaDataOwner &rhs)=default |
| MetaDataOwner & | operator= (MetaDataOwner &)=default |
| void | copyMetaDataFrom (const MetaDataOwner &src) |
| void | copyMetaDataTo (MetaDataOwner &dst) |
|
template<typename T> requires std::derived_from<T, MetaData> | |
| T * | createMetaData (std::string_view key) |
|
template<typename T, typename U> requires std::derived_from<T, MetaData> && Settable<T, U> | |
| void | setMetaData (std::string_view key, U value) |
| template<typename T> requires std::derived_from<T, MetaData> | |
| bool | unsetMetaData (std::string_view key) |
| unset, i.e. remove the metadata entry matching the given key and type | |
|
template<typename T, typename U> requires std::derived_from<T, MetaData> && Gettable<T, U> | |
| U | getMetaData (std::string_view key, U val) const |
|
template<typename T> requires std::derived_from<T, MetaData> | |
| T * | getMetaData (std::string_view key) |
|
template<typename T> requires std::derived_from<T, MetaData> | |
| const T * | getMetaData (std::string_view key) const |
| MetaDataMap * | getMetaDataMap () |
| const MetaDataMap * | getMetaDataMap () const |
| bool | hasMetaData (std::string_view key) const |
|
template<typename T> requires std::derived_from<T, MetaData> | |
| bool | hasMetaData (std::string_view key) const |
| void | serialize (Serializer &s) const |
| void | deserialize (Deserializer &d) |
Public Attributes | |
| DataMapper | dataMap |
| std::array< Axis, 3 > | axes |
Static Public Attributes | |
| static constexpr uvec3 | colorCode {188, 101, 101} |
| static constexpr std::string_view | classIdentifier {"org.inviwo.Volume"} |
| static constexpr std::string_view | dataName {"Volume"} |
Protected Attributes | |
| size3_t | defaultDimensions_ |
| const DataFormatBase * | defaultDataFormat_ |
| SwizzleMask | defaultSwizzleMask_ |
| InterpolationType | defaultInterpolation_ |
| Wrapping3D | defaultWrapping_ |
| HistogramCache | histograms_ |
| Protected Attributes inherited from inviwo::SpatialEntity | |
| std::unique_ptr< SpatialCoordinateTransformer > | transformer_ |
| std::unique_ptr< SpatialCameraCoordinateTransformer > | cameraTransformer_ |
| glm::mat4 | modelMatrix_ |
| glm::mat4 | worldMatrix_ |
| Protected Attributes inherited from inviwo::MetaDataOwner | |
| MetaDataMap | metaData_ |
Additional Inherited Members | |
| Protected Member Functions inherited from inviwo::Data< Volume, VolumeRepresentation > | |
| Data< Volume, VolumeRepresentation > & | operator= (const Data< Volume, VolumeRepresentation > &that) |
| decltype(auto) | getLastOr (F &&f, T &&fallback) const |
| void | setLastAndInvalidateOther (F &&f, T &&value) |
Data structure for volumetric data in form of a structured three-dimensional grid. Basis and offset determine the position and extent of the volume in model space. Skewed volumes are represented by providing a non-orthogonal basis.
In case a volume was loaded via VolumeSource or Volume, the filename of the source data is available via MetaData.
| inviwo::Volume::Volume | ( | const Volume & | rhs, |
| NoData | noData, | ||
| const VolumeConfig & | config = {} ) |
Create a volume based on rhs without copying any data. State from rhs can be overridden by the config
| rhs | source volume providing the necessary information like dimensions, swizzle masks, interpolation, spatial transformations, etc. |
| noData | Tag type to indicate that representations should not be copied from rhs |
| config | custom parameters overriding values from rhs |
|
overridevirtual |
Implements inviwo::Data< Volume, VolumeRepresentation >.
|
overridevirtual |
returns the axis information corresponding to index
index Implements inviwo::SpatialEntity.
|
overridevirtual |
Implements inviwo::StructuredGridEntity< 3 >.
| vec3 inviwo::Volume::getWorldSpaceGradientSpacing | ( | ) | const |
Computes the spacing to be used for gradient computation. Also works for volume with non-orthogonal basis.
For orthogonal lattices this will be equal to the world space voxel spacing. For non-orthogonal lattices it will be the longest of the axes projected onto the world space axes.
World space
b ^ ^
/ |
y ^ / dy | / Voxel | | /__________>a \/ | <-—dx---> |____________> x
The actual gradient spacing vectors are given by mat3{ gradientSpacing.x, 0, 0, 0, gradientSpacing.y, 0, 0, 0, gradientSpacing.z } However, we do not return the zeroes.
To get the spacing in texture space use: mat3(glm::scale(worldToTextureMatrix, getWorldSpaceGradientSpacing()));
| void inviwo::Volume::setDataFormat | ( | const DataFormatBase * | format | ) |
Set the default data format. Existing representations will not be affected.
| format | The format of the data. |
|
virtual |
Resize to dimension. This is destructive, the data will not be preserved.
| void inviwo::Volume::setSwizzleMask | ( | const SwizzleMask & | mask | ) |
update the swizzle mask of the color channels when sampling the volume
| mask | new swizzle mask |