![]() |
Inviwo 0.9.12-pre
Inviwo documentation
|
A VolumeLoader that computes each frame on the fly via a callable. More...
#include <inviwo/core/datastructures/volume/temporalvolume.h>
Inheritance diagram for inviwo::ProceduralLoader:Public Types | |
| using | Generator |
Public Member Functions | |
| virtual std::shared_ptr< Volume > | load (size_t index, std::shared_ptr< Volume > reuse, std::stop_token stop) const override |
| ProceduralLoader (size_t count, std::vector< Seconds > times, VolumeConfig prototype, Generator generator) | |
| virtual VolumeConfig | prototype () const override |
| virtual size_t | size () const override |
| Total number of frames. | |
| virtual Seconds | time (size_t index) const override |
Public Member Functions inherited from inviwo::TemporalVolumeLoader | |
| TemporalVolumeLoader & | operator= (const TemporalVolumeLoader &)=default |
| TemporalVolumeLoader & | operator= (TemporalVolumeLoader &&)=default |
| TemporalVolumeLoader (const TemporalVolumeLoader &)=default | |
| TemporalVolumeLoader (TemporalVolumeLoader &&)=default | |
A VolumeLoader that computes each frame on the fly via a callable.
Useful for procedural data, simulations, or testing.
Signature of the generator callable, given a frame index, its time value, an optional reuse volume whose storage may be reused (may be null), and a stop token.
| inviwo::ProceduralLoader::ProceduralLoader | ( | size_t | count, |
| std::vector< Seconds > | times, | ||
| VolumeConfig | prototype, | ||
| Generator | generator ) |
| count | number of frames |
| times | physical time values, either empty or of size count |
| prototype | metadata-only prototype config |
| generator | callable producing the volume for a given index/time |
|
overridevirtual |
Load the volume at the given index. May be called from a background thread, hence implementations must be re-entrant and thread-safe.
| reuse | an optional volume whose storage may be reused to avoid reallocation. It may be null and must be ignored if its format or dimensions do not match the frame. |
| stop | cancellation token. Implementations should poll stop.stop_requested() at natural checkpoints and return nullptr as soon as a stop is requested. A partially written reuse volume is discarded by the caller. |
Implements inviwo::TemporalVolumeLoader.
|
overridevirtual |
A prototype VolumeConfig describing dimensions, format, basis, dataMap, and axes — but no voxel data. Used by downstream consumers that need metadata without triggering a load.
Implements inviwo::TemporalVolumeLoader.
|
overridevirtual |
Total number of frames.
Implements inviwo::TemporalVolumeLoader.
|
overridevirtual |
Physical time value for frame index. The values are expected to be sorted in ascending order.
Implements inviwo::TemporalVolumeLoader.