MayaFlux 0.1.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ spatial()

DataDimension MayaFlux::Kakshya::DataDimension::spatial ( uint64_t  size,
char  axis,
uint64_t  stride = 1,
std::string  name = "spatial" 
)
static

Convenience constructor for a spatial dimension.

Parameters
sizeNumber of elements along this axis
axisAxis character ('x', 'y', or 'z')
strideMemory stride (default: 1)
nameOptional name (default: "pixels")
Returns
DataDimension representing a spatial axis

Definition at line 29 of file NDData.cpp.

30{
31 Role r = [axis]() {
32 switch (axis) {
33 case 'x':
34 return Role::SPATIAL_X;
35 case 'y':
36 return Role::SPATIAL_Y;
37 case 'z':
38 default:
39 return Role::SPATIAL_Z;
40 }
41 }();
42
43 if (name == "") {
44 name = std::string("spatial_") + axis;
45 }
46 return { name, size, stride, r };
47}
Role
Semantic role of the dimension.
Definition NDData.hpp:145
@ SPATIAL_X
Spatial X axis (images, tensors)
uint64_t stride
Memory stride (elements between consecutive indices)
Definition NDData.hpp:189
std::string name
Human-readable identifier for the dimension.
Definition NDData.hpp:187
uint64_t size
Number of elements in this dimension.
Definition NDData.hpp:188

References name, size, SPATIAL_X, SPATIAL_Y, SPATIAL_Z, and stride.

Referenced by create_dimensions(), MayaFlux::Kakshya::detect_data_dimensions(), MayaFlux::Kakshya::detect_data_dimensions(), MayaFlux::Yantra::infer_from_eigen(), spatial_1d(), spatial_2d(), and spatial_3d().

+ Here is the caller graph for this function: