![]() |
ImFusion C++ SDK 4.4.0
|
#include <ImFusion/ImageMath/Tpl/Scalar.h>
Specialization of ExprBaseTpl for a single scalar value. More...
Specialization of ExprBaseTpl for a single scalar value.
Forward declaration of Scalar, needed below.
Just a wrapper for a single scalar value which is "streamed" to all pixels.
Public Types | |
| using | expr_type = typename std::decay<T>::type |
| using | var_type = void |
| using | imf_img_type = void |
Public Member Functions | |
| Scalar (T val) | |
| template<typename ImgT> | |
| auto | convertToMemImgExpr () const noexcept |
| auto | convertToSharedImgExpr (std::size_t) const |
| IMFUSION_STRONG_INLINE expr_type | eval (const std::size_t, const vec4i &) const |
| Evaluate the expression at position i. | |
| ImageDescriptor | imgDesc () const override final |
| get image descriptor | |
| int | numImgs () const override final |
| Get number of images. | |
| DeviceStrategy | deviceStrategy () const override final |
| Return DeviceStrategy of this expression. | |
| Public Member Functions inherited from ImFusion::ImageMath::ExprBaseTpl< Scalar< T > > | |
| const auto & | get () const |
| get a const reference to this with the actual type | |
| auto | polyWrapper () const |
| auto | uniquePolyWrapper () const |
| auto | sharedPolyWrapper () const |
| auto | binaryOp (const ExprBaseTpl< RhsT > &rhs, const Op &func=Op()) const |
| auto | unaryOp (const Op &func=Op()) const |
| 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 |
| auto | head () |
| ADD_SPECIAL_SWIZZLE (x, {0}) | |
| auto | streamChannels (int numStreamedChannels) const |
| auto | substituteVariableWithImg (T &img) const |
| auto | operator- () const |
| 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,. | |
| auto | channelReduction () |
| ADD_CHANNEL_REDUCTION_OPERATOR (channelSum, add) | |
| auto | channelMean () |
| auto | squaredLength () const |
| auto | channelDistance (const ExprBaseTpl< RhsT > &other) const |
| auto | dot (const ExprBaseTpl< RhsT > &other) const |
| auto | stashThenApply (const ExprBaseTpl< VariableT > &varExpr) const |
| auto | hnormalized () const |
| auto | normalized () const |
| auto | homogeneous () const |
| auto | appendZero () const |
| auto | select (const ExprBaseTpl< LhsT > &lhs, const ExprBaseTpl< RhsT > &rhs) const |
| Ternary (condition.x ? if_true : if_false) operator. | |
| ADD_REDUCTION_OPERATOR (sum, add) | |
| ADD_ARG_REDUCTION_OPERATOR (min, min) | |
| 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 |
| auto | evaluateIntoImage (bool clearShiftScale=false) const |
| Create an empty image and evaluate this expression into it. | |
| auto | toMask () const |
| auto | toDeformation (const ImageDescriptorWorld imgDesc) const |
| auto | resample (const ImageDescriptorWorld &inputDesc, const ImageDescriptorWorld &outputDesc) const |
| Public Member Functions inherited from ImFusion::ImageMath::internal::ScalarGl< Scalar< T > > | |
| std::string | evalString (bool tagAndAssign=true) const override |
| Print expression. | |
| void | tagAndAssignNames (std::unordered_map< internal::TaggingIndex, const void * > &taggedLeaves, std::unordered_map< std::type_index, int > &countPerLeafType, const std::string &prefix) const override |
| We need to tag leaves and tell unique leaves that they are responsible to define the uniforms and set the shader arguments. | |
| void | getUniformDefinitionList (std::string &definitionList, const std::vector< int > &, const std::string &) const override |
| Collect uniform/sampler definitions. | |
| void | getVariableDefinitionList (std::string &, const std::vector< int > &, const std::string &) const override |
| Collect variable definitions. | |
| int | setArguments (GL::Program &p, const std::vector< int > &, const std::string &prefix) const override |
| Set uniform/sampler arguments. | |
| std::vector< internal::GlExprInterface * > | children () override |
| Used for traversing the expression tree. Contains the immediate children of node. | |
| Public Member Functions inherited from ImFusion::ImageMath::internal::GlExprInterface | |
| ExprInterface & | exprInterface () |
| Get image descriptor of the wrapped expression. | |
| const ExprInterface & | exprInterface () const |
| virtual std::vector< const GlExprInterface * > | children () const =0 |
| Used for traversing the expression tree. Contains the immediate children of node. | |
| virtual bool | setMagFilter (ImageMath::MagFilter mag) |
| Set interpolation behaviour of the current leaf (only). | |
| virtual bool | setWrap (ImageMath::Wrap wrap) |
| Set interpolation behaviour of the current leaf (only). | |
| bool | setMagFilterRecursive (ImageMath::MagFilter mag) |
| Set interpolation behaviour of the current leaf and all of its children. | |
| bool | setWrapRecursive (ImageMath::Wrap wrap) |
| Set wrap behaviour of the current leaf and all of its children. | |
Static Public Attributes | |
| static constexpr bool | has_variable = false |
|
inlinefinaloverridevirtual |
get image descriptor
Implements ImFusion::ImageMath::ExprInterface.
|
inlinefinaloverridevirtual |
Get number of images.
Implements ImFusion::ImageMath::ExprInterface.
|
inlinefinaloverridevirtual |
Return DeviceStrategy of this expression.
Implements ImFusion::ImageMath::ExprInterface.