16 #ifndef __IPSDKIMAGEPROCESSING_RULEMATCHLEAFTOIMAGESIZE_H__ 17 #define __IPSDKIMAGEPROCESSING_RULEMATCHLEAFTOIMAGESIZE_H__ 19 #include <IPSDKImageProcessing/Rule/Image/ImageBinaryMixed/BaseRuleMatchScalarToImageSize.h> 20 #include <IPSDKImageProcessing/Attribute/Image/BaseImageAttribute.h> 29 template <
typename AttributeType,
typename LeafType>
38 typedef typename boost::enable_if<typename boost::is_same<boost::mpl::int_<AttributeType::g_attributeType>,
39 boost::mpl::int_<processor::eAttributeType::eAT_DataItem> >::type,
43 typedef typename boost::enable_if<typename boost::is_same<boost::mpl::int_<LeafType::g_itemType>,
44 boost::mpl::int_<eDataItemType::eDIT_Leaf> >::type,
64 const boost::weak_ptr<const AttributeType>& pValueAttribute);
81 template <
typename AttributeType,
typename LeafType>
86 const boost::weak_ptr<const AttributeType>& pValueAttribute)
89 _matchImageSizeType = matchImageSizeType;
92 _matchImageSizeScale = matchImageSizeScale;
98 template <
typename AttributeType,
typename LeafType>
103 const AttributeType& valueAttribute =
static_cast<const AttributeType&
>(getAttribute2());
105 return static_cast<ipReal64>(valueAttribute.getNode().template getValue<LeafType>());
108 template <
typename AttributeType,
typename LeafType>
112 return ValueAttributeType::getObjectNameStr() +
"::" +
113 DataItemType::template getNodeNameStr<LeafType>();
122 #endif // __IPSDKIMAGEPROCESSING_RULEMATCHLEAFTOIMAGESIZE_H__ ipReal64 retrieveValue() const
method allowing to retrieve value associated to attribute leaf in derived class
Definition: RuleMatchLeafToImageSize.h:100
eMatchImageSizeScale
enumerate used in comparison between scalar and image size, to determine whether scalar is compared t...
Definition: ImageBinaryMixedRuleTypes.h:59
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
boost::enable_if< typename boost::is_same< boost::mpl::int_< LeafType::g_itemType >, boost::mpl::int_< eDataItemType::eDIT_Leaf > >::type, typename LeafType::ValueType >::type ValueType
Value type associated to leaf.
Definition: RuleMatchLeafToImageSize.h:45
void init(const eMatchImageSizeType &matchImageSizeType, const eMatchImageSizeScale &matchImageSizeScale, const ImageAttributeConstWeakPtr &pImageAttribute, const boost::weak_ptr< const AttributeType > &pValueAttribute)
initialization of object
Definition: RuleMatchLeafToImageSize.h:83
boost::weak_ptr< const BaseImageAttribute > ImageAttributeConstWeakPtr
Definition: ImageAttributeTypes.h:38
AttributeType ValueAttributeType
Value attribute type.
Definition: RuleMatchLeafToImageSize.h:35
double ipReal64
Base types definition.
Definition: BaseTypes.h:57
void initBase()
base class initialization method
boost::enable_if< typename boost::is_same< boost::mpl::int_< AttributeType::g_attributeType >, boost::mpl::int_< processor::eAttributeType::eAT_DataItem > >::type, typename AttributeType::ValueType >::type DataItemType
retrieve DataItem node type associated to attribute
Definition: RuleMatchLeafToImageSize.h:40
Base class for rules allowing to check that a value is lower than the smallest dimension of an image...
Definition: BaseRuleMatchScalarToImageSize.h:31
eMatchImageSizeType
enumerate describing image comparison on image size rule operation type
Definition: ImageRuleTypes.h:50
Rule class allowing to check that a DataItem leaf value is lower than or equals to image size in give...
Definition: RuleMatchLeafToImageSize.h:30
Predefined types for data items.
std::string retrieveValueAttributeName() const
method allowing to retrieve value associated to attribute leaf in derived class
Definition: RuleMatchLeafToImageSize.h:110