![]() |
Inviwo 0.9.12-pre
Inviwo documentation
|
Inheritance diagram for inviwo::VolumeRAM:Public Member Functions | |
| virtual VolumeRAM * | clone () const override=0 |
| template<typename Result , template< class > class Predicate = dispatching::filter::All, typename Callable , typename... Args> | |
| auto | dispatch (Callable &&callable, Args &&... args) -> Result |
| template<typename Result , template< class > class Predicate = dispatching::filter::All, typename Callable , typename... Args> | |
| auto | dispatch (Callable &&callable, Args &&... args) const -> Result |
| virtual double | getAsDouble (const size3_t &pos) const =0 |
| virtual dvec2 | getAsDVec2 (const size3_t &pos) const =0 |
| virtual dvec3 | getAsDVec3 (const size3_t &pos) const =0 |
| virtual dvec4 | getAsDVec4 (const size3_t &pos) const =0 |
| virtual double | getAsNormalizedDouble (const size3_t &pos) const =0 |
| virtual dvec2 | getAsNormalizedDVec2 (const size3_t &pos) const =0 |
| virtual dvec3 | getAsNormalizedDVec3 (const size3_t &pos) const =0 |
| virtual dvec4 | getAsNormalizedDVec4 (const size3_t &pos) const =0 |
| virtual const void * | getData () const =0 |
| virtual void * | getData ()=0 |
| virtual const void * | getData (size_t) const =0 |
| virtual void * | getData (size_t)=0 |
| virtual size_t | getNumberOfBytes () const =0 |
| virtual std::type_index | getTypeIndex () const override final |
| virtual void | removeDataOwnership ()=0 |
| virtual void | setData (void *data, size3_t dimensions)=0 |
| Takes ownership of data pointer. | |
| virtual void | setFromDouble (const size3_t &pos, double val)=0 |
| virtual void | setFromDVec2 (const size3_t &pos, dvec2 val)=0 |
| virtual void | setFromDVec3 (const size3_t &pos, dvec3 val)=0 |
| virtual void | setFromDVec4 (const size3_t &pos, dvec4 val)=0 |
| virtual void | setFromNormalizedDouble (const size3_t &pos, double val)=0 |
| virtual void | setFromNormalizedDVec2 (const size3_t &pos, dvec2 val)=0 |
| virtual void | setFromNormalizedDVec3 (const size3_t &pos, dvec3 val)=0 |
| virtual void | setFromNormalizedDVec4 (const size3_t &pos, dvec4 val)=0 |
Public Member Functions inherited from inviwo::VolumeRepresentation | |
| VolumeReprConfig | config () const |
| virtual const DataFormatBase * | getDataFormat () const =0 |
| DataFormatId | getDataFormatId () const |
| std::string_view | getDataFormatString () const |
| virtual const size3_t & | getDimensions () const =0 |
| virtual InterpolationType | getInterpolation () const =0 |
| virtual SwizzleMask | getSwizzleMask () const =0 |
| virtual Wrapping3D | getWrapping () const =0 |
| virtual void | setDimensions (size3_t dimensions)=0 |
| virtual void | setInterpolation (InterpolationType interpolation)=0 |
| virtual void | setSwizzleMask (const SwizzleMask &mask)=0 |
| update the swizzle mask of the color channels when sampling the volume | |
| virtual void | setWrapping (const Wrapping3D &wrapping)=0 |
Public Member Functions inherited from inviwo::DataRepresentation< Volume > | |
| const Volume * | getOwner () const |
| bool | isValid () const |
| void | setOwner (const Volume *owner) |
| void | setValid (bool valid) |
| virtual void | updateResource (const ResourceMeta &) const |
Protected Member Functions | |
| VolumeRAM & | operator= (const VolumeRAM &that)=default |
| VolumeRAM & | operator= (VolumeRAM &&that)=default |
| VolumeRAM (const VolumeRAM &rhs)=default | |
| VolumeRAM (VolumeRAM &rhs)=default | |
Protected Member Functions inherited from inviwo::VolumeRepresentation | |
| VolumeRepresentation & | operator= (const VolumeRepresentation &that)=default |
| VolumeRepresentation (const VolumeRepresentation &rhs)=default | |
Protected Member Functions inherited from inviwo::DataRepresentation< Volume > | |
| DataRepresentation (const DataRepresentation &rhs)=default | |
| DataRepresentation & | operator= (const DataRepresentation &that)=default |
Additional Inherited Members | |
Public Types inherited from inviwo::DataRepresentation< Volume > | |
| using | ReprOwner |
Protected Attributes inherited from inviwo::DataRepresentation< Volume > | |
| bool | isValid_ |
| const Volume * | owner_ |
|
overridepure virtual |
Implements inviwo::VolumeRepresentation.
| auto inviwo::VolumeRAM::dispatch | ( | Callable && | callable, |
| Args &&... | args ) -> Result |
Dispatch functionality to retrieve the actual underlaying VolumeRamPrecision. The dispatcher takes a generic lambda as argument. Code will be instantiated for all the DataFormat types by default. But by suppling the template Predicate argument the list of formats to instantiate can be filtered. Hence if one knows that only Vector types are applicable there is no need to write generic code that also works for scalars.
Example of counting the number of elements larger then 0:
dispatching::filter namespace have a few standard ones predefined.| callable | This should be a generic lambda or a struct with a generic call operator. it will be called with the specific VolumeRamPresision<T> as the first argument and any additional arguments (args) appended to that. |
| args | Any additional arguments that should be passed on to the lambda. |
| dispatching::DispatchException | in the case that the format of the buffer is not in the list of formats after the filtering. |
| auto inviwo::VolumeRAM::dispatch | ( | Callable && | callable, |
| Args &&... | args ) const -> Result |
Const overload. Callable will be called with a const VolumeRamPresision<T> pointer.
|
finaloverridevirtual |
Implements inviwo::DataRepresentation< Volume >.
|
pure virtual |
Takes ownership of data pointer.
| data | is raw volume data pointer |
| dimensions | is the dimensions of the data. |
Implemented in inviwo::VolumeRAMPrecision< T >.