IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
ForwardDiscreteFourierTransform2dImgLvl1.h
1 // ForwardDiscreteFourierTransform2dImgLvl1.h:
3 // -------------------------------------------
4 //
14 
15 #ifndef __IPSDKIPLINTENSITYTRANSFORM_FORWARDDISCRETEFOURIERTRANSFORM2DIMGLVL1_H__
16 #define __IPSDKIPLINTENSITYTRANSFORM_FORWARDDISCRETEFOURIERTRANSFORM2DIMGLVL1_H__
17 
21 
22 // Attributes headers
23 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Image/Input/InImg.h>
24 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/DataItem/InOptDFTConfig.h>
25 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Image/Output/OutDFTImg1.h>
26 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Image/Output/OutDFTImg2.h>
27 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Image/Output/Gpu/Working/Optional/OutOptWk1RealGpuImg.h>
28 
29 namespace ipsdk {
30 namespace imaproc {
31 namespace itrans {
32 
35 
36 // declare processor class
37 IPSDK_DECLARE_LVL1_PROCESSOR(ASYNC4, IPSDKIPLIntensityTransform, ForwardDiscreteFourierTransform2dImg,
38  ipsdk::processor::none()&&//ipsdk::imaproc::matchSize(_pInImg, _pOutDFTImg1, _pOutDFTImg2) &&
39  //ipsdk::processor::If(ipsdk::processor::isSet(_pOutOptWk1RealGpuImg),
40  // CustomRuleTODO(_pInImg, _pOutOptWk1RealGpuImg),
41  // ipsdk::processor::none()),
42  ipsdk::imaproc::noInSitu(_pInImg, _pOutDFTImg1),
43  (((ipsdk)(imaproc)(attr))(InImg))
44  (((ipsdk)(imaproc)(attr))(InOptDFTConfig))
45  (((ipsdk)(imaproc)(attr))(OutOptWk1RealGpuImg))
46  (((ipsdk)(imaproc)(attr))(OutDFTImg1)(duplicateInOut)(_pInImg)(ipsdk::image::eImageBufferType::eIBT_Real32))
47  (((ipsdk)(imaproc)(attr))(OutDFTImg2)(duplicateInOut)(_pInImg)(ipsdk::image::eImageBufferType::eIBT_Real32)))
48 
49 // methods
50 public:
51 
52 protected:
53 
54  processor::RetrievalResult provideProcessor(const boost::shared_ptr<core::BaseAction>& pProcessor,
55  const core::BasePriority& priority,
56  core::ActionProviderPtr& pProvider);
57 
58  processor::RetrievalResult convert(const core::BasePriority& priority, core::ActionProviderPtr& pProvider);
59  processor::RetrievalResult erase(const core::BasePriority& priority, core::ActionProviderPtr& pProvider);
60  processor::RetrievalResult fft(const core::BasePriority& priority, core::ActionProviderPtr& pProvider);
61  processor::RetrievalResult cartesianToPolar(const core::BasePriority& priority, core::ActionProviderPtr& pProvider);
62 
63 // attributes
64 protected:
65  // Flag indicating if the transform is processed on GPU
66  bool _bProcessedOnGpu;
67 };
68 
71 
72 } // end of namespace itrans
73 } // end of namespace imaproc
74 } // end of namespace ipsdk
75 
76 #endif // __IPSDKIPLINTENSITYTRANSFORM_FORWARDDISCRETEFOURIERTRANSFORM2DIMGLVL1_H__
ProcessingResult< eRetrievalResultType > RetrievalResult
#define IPSDK_DECLARE_LVL1_PROCESSOR(ProcType, libraryName, algoName, RuleString, attributeSeq)
IPSDK_FORCEINLINE void cartesianToPolar(const TIn x, const TIn y, TOut &rho, TOut &theta)
IPSDKBASEPROCESSING_API RulePtr none()
processor::OutputInitializerPtr duplicateInOut(const boost::weak_ptr< OutputAttributeType > &pOutputAttribute, const boost::weak_ptr< InputAttributeType > &pInputAttribute, const eImageInitializerStoragePolicy &storagePolicy=eImageInitializerStoragePolicy::eIISP_Inherit)
IPSDKGEOMETRY_API Vector2d convert(const Point2d< T > &pt)
Definition of import/export macro for library.
boost::shared_ptr< BaseActionProvider > ActionProviderPtr