template<typename ImplType>
class ImFusion::ImageMath::ExprBaseTpl< ImplType >
Base class for compile-time optimized expressions (curiously recurring template pattern (CRTP)).
- Template Parameters
-
ExprBaseTpl provides a compile-time optimized interface for arithmetic expressions on ImFusion images. Arithmetic operations are combined into a ExprBaseTpl object expressing the full expression. This expression is evaluation if assigned to a Array object. No temporary images are required and each pixel is only touched once while evaluating the full expression tree at once.
Example usage for compile-time optimized expressions:
auto expr1 = (img1Expr + img2Expr) * img3Expr;
img4Expr = expr1;
Specialization of ExprBase for a image leaf, i.e.
Definition Array.h:89
Image shared on multiple devices.
Definition SharedImage.h:86
|
| auto | polyWrapper () const |
| auto | uniquePolyWrapper () const |
| auto | sharedPolyWrapper () const |
| template<typename Op, typename RhsT> |
| auto | binaryOp (const ExprBaseTpl< RhsT > &rhs, const Op &func=Op()) const |
|
template<typename Op, typename RhsT> |
| auto | binaryOp (RhsT rhs, const Op &func=Op(), typename std::enable_if< std::is_arithmetic_v< RhsT > >::type *=nullptr) const |
|
template<typename Op, typename RhsT, int Dim, int Options, int MaxRows, int MaxCols> |
| auto | binaryOp (Eigen::Matrix< RhsT, Dim, 1, Options, MaxRows, MaxCols > rhs, const Op &func=Op(), typename std::enable_if< std::is_arithmetic_v< RhsT > >::type *=nullptr) const |
| template<typename Op, typename StringOp, typename RhsT> |
| auto | binaryOp (const ExprBaseTpl< RhsT > &rhs, const Op &func, const StringOp &stringFunc) const |
|
template<typename Op, typename StringOp, typename RhsT> |
| auto | binaryOp (RhsT rhs, const Op &func, const StringOp &stringFunc, typename std::enable_if< std::is_arithmetic_v< RhsT > >::type *=nullptr) const |
|
template<typename Op, typename StringOp, typename RhsT, int Dim, int Options, int MaxRows, int MaxCols> |
| auto | binaryOp (Eigen::Matrix< RhsT, Dim, 1, Options, MaxRows, MaxCols > rhs, const Op &func, const StringOp &stringFunc, typename std::enable_if< std::is_arithmetic_v< RhsT > >::type *=nullptr) const |
| template<typename Op> |
| auto | unaryOp (const Op &func=Op()) const |
| template<typename Op, typename StringOp> |
| auto | unaryOp (const Op &func, const StringOp &stringFunc) const |
| template<typename Op> |
| reduction_type | reduce (std::vector< vec4i > *arg=nullptr) const |
|
auto | forceCPU () const |
| | Forces CPU execution.
|
|
auto | forceGPU () const |
| | Forces GPU execution.
|
|
| auto | channelSwizzle (const std::vector< std::size_t > &indices) const |
|
template<size_t i> |
| auto | head () |
|
| ADD_SPECIAL_SWIZZLE (x, {0}) |
|
| ADD_SPECIAL_SWIZZLE (y, {1}) |
|
| ADD_SPECIAL_SWIZZLE (z, {2}) |
|
| ADD_SPECIAL_SWIZZLE (w, {3}) |
|
| ADD_SPECIAL_SWIZZLE (r, {0}) |
|
| ADD_SPECIAL_SWIZZLE (g, {1}) |
|
| ADD_SPECIAL_SWIZZLE (b, {2}) |
|
| ADD_SPECIAL_SWIZZLE (a, {3}) |
|
| ADD_SPECIAL_SWIZZLE (xy, std::vector< size_t >({0, 1})) |
|
| ADD_SPECIAL_SWIZZLE (rg, std::vector< size_t >({0, 1})) |
|
| ADD_SPECIAL_SWIZZLE (xyz, std::vector< size_t >({0, 1, 2})) |
|
| ADD_SPECIAL_SWIZZLE (xyzw, std::vector< size_t >({0, 1, 2, 3})) |
|
| ADD_SPECIAL_SWIZZLE (rgb, std::vector< size_t >({0, 1, 2})) |
|
| ADD_SPECIAL_SWIZZLE (rgba, std::vector< size_t >({0, 1, 2, 3})) |
| auto | streamChannels (int numStreamedChannels) const |
| template<typename T> |
| auto | substituteVariableWithImg (T &img) const |
|
|
template<typename CastT> |
| auto | cast () const |
| auto | storageToOriginal (const ImageDescriptor &desc) |
| | Apply shift/scale to the operand,.
|
| auto | originalToStorage (const ImageDescriptor &desc) |
| | Apply shift/scale to the operand,.
|
|
template<typename Op> |
| auto | channelReduction () |
|
| ADD_CHANNEL_REDUCTION_OPERATOR (channelSum, add) |
|
| ADD_CHANNEL_REDUCTION_OPERATOR (channelProd, mult) |
|
| ADD_CHANNEL_REDUCTION_OPERATOR (channelMax, max) |
|
| ADD_CHANNEL_REDUCTION_OPERATOR (channelMin, min) |
|
| ADD_CHANNEL_REDUCTION_OPERATOR (length, length) |
|
auto | channelMean () |
|
auto | squaredLength () const |
|
template<typename RhsT> |
| auto | channelDistance (const ExprBaseTpl< RhsT > &other) const |
|
template<typename T, int Dim> |
| auto | channelDistance (const Eigen::Matrix< T, Dim, 1 > c) |
|
template<typename RhsT> |
| auto | dot (const ExprBaseTpl< RhsT > &other) const |
|
template<typename VariableT> |
| auto | stashThenApply (const ExprBaseTpl< VariableT > &varExpr) const |
|
template<typename VarT = double> |
| auto | hnormalized () const |
|
template<typename VarT = double> |
| auto | normalized () const |
|
auto | homogeneous () const |
|
auto | appendZero () const |
|
|
template<typename LhsT, typename RhsT> |
| auto | select (const ExprBaseTpl< LhsT > &lhs, const ExprBaseTpl< RhsT > &rhs) const |
| | Ternary (condition.x ? if_true : if_false) operator.
|
|
template<typename LhsT, typename RhsT> |
| auto | select (LhsT lhs, RhsT rhs, typename std::enable_if< std::is_arithmetic_v< LhsT > &&std::is_arithmetic_v< RhsT > >::type *=nullptr) const |
| | Ternary (condition.x ? if_true : if_false) operator.
|
|
template<typename LhsT, typename RhsT> |
| auto | select (LhsT lhs, const ExprBaseTpl< RhsT > &rhs, typename std::enable_if< std::is_arithmetic_v< LhsT > >::type *=nullptr) const |
| | Ternary (condition.x ? if_true : if_false) operator.
|
|
template<typename LhsT, typename RhsT> |
| auto | select (const ExprBaseTpl< LhsT > &lhs, RhsT rhs, typename std::enable_if< std::is_arithmetic_v< RhsT > >::type *=nullptr) const |
| | Ternary (condition.x ? if_true : if_false) operator.
|
|
|
| ADD_REDUCTION_OPERATOR (sum, add) |
|
| ADD_REDUCTION_OPERATOR (prod, mult) |
|
| ADD_ARG_REDUCTION_OPERATOR (min, min) |
|
| ADD_ARG_REDUCTION_OPERATOR (max, max) |
| Eigen::Matrix< double, Eigen::Dynamic, 1 > | mean () const |
| Eigen::Matrix< double, Eigen::Dynamic, 1 > | l1Norm () const |
| Eigen::Matrix< double, Eigen::Dynamic, 1 > | squaredl2Norm () const |
| Eigen::Matrix< double, Eigen::Dynamic, 1 > | l2Norm () const |
| Eigen::Matrix< double, Eigen::Dynamic, 1 > | lpNorm (double p) const |
| Eigen::Matrix< double, Eigen::Dynamic, 1 > | lInfNorm () const |