IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
Zoom2dImgLvl1.h
1 // Zoom2dImgLvl1.h:
3 // --------------
4 //
14 
15 #ifndef __IPSDKIPLGEOMETRICTRANSFORM_ZOOM2DIMGLVL1_H__
16 #define __IPSDKIPLGEOMETRICTRANSFORM_ZOOM2DIMGLVL1_H__
17 
22 
23 // Attributes headers
24 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Image/Input/InImg.h>
25 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Image/Output/OutImg.h>
26 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/DataItem/InOptScaleFactor2d.h>
27 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/DataItem/InOptOutputImg2dSize.h>
28 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Enumerate/InZoomInterpolationMethod.h>
29 
30 namespace ipsdk {
31 namespace imaproc {
32 namespace gtrans {
33 
36 
37 // declare processor class
38 IPSDK_DECLARE_LVL1_PROCESSOR(ASYNC1, IPSDKIPLGeometricTransform, Zoom2dImg,
39  ipsdk::imaproc::noInSitu(_pInImg, _pOutImg) &&
40  ipsdk::processor::If(ipsdk::processor::isSet(_pInOptOutputImg2dSize),
41  ipsdk::processor::Not(ipsdk::processor::isSet(_pInOptScaleFactor2d)),
42  ipsdk::processor::isSet(_pInOptScaleFactor2d)) &&
43  ipsdk::imaproc::matchSize(eMatchImageSizeType::eMIST_ZCT, _pInImg, _pOutImg) &&
44  ipsdk::imaproc::customImageProperty(_pOutImg, matchZoom2d(_pInImg, _pInOptScaleFactor2d, _pInOptOutputImg2dSize)),
45  (((ipsdk)(imaproc)(attr))(InImg))
46  (((ipsdk)(imaproc)(attr))(InZoomInterpolationMethod))
47  (((ipsdk)(imaproc)(attr))(InOptOutputImg2dSize))
48  (((ipsdk)(imaproc)(attr))(InOptScaleFactor2d))
49  (((ipsdk)(imaproc)(attr))(OutImg)(customOutput)(outputZoom2d(_pInImg, _pInOptScaleFactor2d, _pInOptOutputImg2dSize))))
50 
51 // methods
52 public:
53 
54 protected:
55 
58  core::ExecResult postProcess();
59 
60 // attributes
61 protected:
62  // Scale factors in each direction
63  ipReal64 _xScaleFactor;
64  ipReal64 _yScaleFactor;
65 
66 };
67 
70 
71 } // end of namespace gtrans
72 } // end of namespace imaproc
73 } // end of namespace ipsdk
74 
75 #endif // __IPSDKIPLGEOMETRICTRANSFORM_ZOOM2DIMGLVL1_H__
Utility functions for zoom attribute output initialization management.
#define IPSDK_DECLARE_LVL1_PROCESSOR(ProcType, libraryName, algoName, RuleString, attributeSeq)
IPSDKIPLGEOMETRICTRANSFORM_API CustomImageInfoPtr outputZoom2d(const ImageAttributeConstPtr &pInputAttribute, const boost::shared_ptr< const attr::InOptScaleFactor2d > &pScaleAttribute, const boost::shared_ptr< const attr::InOptOutputImg2dSize > &pSizeAttribute)
function allowing to create a Zoom 2d output image initializer
IPSDKBASEPROCESSING_API RulePtr Not(const RulePtr &pRule)
double ipReal64
Definition of import/export macro for library.
processor::OutputInitializerPtr customOutput(const boost::weak_ptr< OutputAttributeType > &pOutputAttribute, const CustomImageInfoPtr &pCustomImageInfo)
ProcessingResult< eExecutionResult > ExecResult
IPSDKIPLGEOMETRICTRANSFORM_API CustomCheckedImagePropertyPtr matchZoom2d(const ImageAttributeConstPtr &pInputAttribute, const boost::shared_ptr< const attr::InOptScaleFactor2d > &pScaleAttribute, const boost::shared_ptr< const attr::InOptOutputImg2dSize > &pSizeAttribute)
boost::enable_if_c< AttributeType::g_bOptional, RulePtr >::type isSet(const boost::shared_ptr< AttributeType > &pAttribute)
Utility functions for Zoom attribute rules management.
IPSDKBASEPROCESSING_API RulePtr If(const RulePtr &pPredicate, const RulePtr &pRuleTrue)