|
◆ makeRaster() [2/2]
Raster< typename TContainer::value_type, sizeof...(Longs), DataContainerHolder< typename TContainer::value_type, TContainer > > makeRaster |
( |
TContainer && |
data, |
|
|
Longs... |
shape |
|
) |
| |
|
related |
Shortcut to create a raster from a shape and data without specifying the template parameters.
- Template Parameters
-
T | The pixel type, should not be specified (automatically deduced) |
Longs | The axes lengths, should not be specified (automatically deduced) |
- Parameters
-
data | The raster values, which can be either a pointer (or C array) or a vector |
shape | The shape as a comma-separated list of long s |
- Example
Given:
- long width, height, depth: The axes lengths;
- float* ptr: The pixel values as a pointer;
auto ptrRaster2D = makeRaster(ptr, width, height);
auto ptrRaster3D = makeRaster(ptr, width, height, depth);
auto vecRaster2D = makeRaster(vec, width, height);
Raster< typename TContainer::value_type, sizeof...(Longs), DataContainerHolder< typename TContainer::value_type, TContainer > > makeRaster(TContainer &&data, Longs... shape) Shortcut to create a raster from a shape and data without specifying the template parameters. Definition: Raster.h:382
|