|
FiberVISH 0.2
Fish - The Fiber Bundle API for the Vish Visualization Shell
|
Template class to construct an OnDemandCreator to extract a 2D slice from a 3D data array with abitrary data conversion during extraction. More...
#include <SliceExtractor.hpp>
Public Types | |
| typedef SliceExtractor< Converter, META::NIL >::Constructor_t | Constructor_t |
| typedef Converter::output_type | output_type |
| typedef InputType | input_type |
Public Member Functions | |
| SliceExtractor (Constructor_t &Params, const WeakPtr< CreativeArrayBase > &CAB) | |
Template class to construct an OnDemandCreator to extract a 2D slice from a 3D data array with abitrary data conversion during extraction.
The slice extractor for a specific input type.
The converter template class argument needs to provides an optional input and mandatory output types, plus a copy() function:
Using the SliceExtractor then allows to define a Creator that extracts slices on demand from a list of possible input types:
Usage:
Note that some output arrays require the destination type to be a type itself instead of a reference to a type when access to an array is performed via a proxy class. This is the case for instance when using FixedArray<> as argument type:
As advanced usage, the converter may also perform numerical operations during slice extraction, for instance computing the norm of a vector (actually, a 3-vector's base class in this code snippet):