IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
PixelClassificationRFImgLvl1.h
1 // PixelClassificationRFImgLvl1.h:
3 // -------------------------------
4 //
14 
15 #ifndef __IPSDKIPLMACHINELEARNING_PIXELCLASSIFICATIONRFIMGLVL1_H__
16 #define __IPSDKIPLMACHINELEARNING_PIXELCLASSIFICATIONRFIMGLVL1_H__
17 
20 #include <IPSDKIPL/IPSDKIPLMachineLearning/OutputInitializer/RFInitializerUtils.h>
22 
23 // Attributes headers
24 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/DataItem/InRandomForestModel.h>
25 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Image/Input/InImg.h>
26 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Image/Output/OutBinLabImg.h>
27 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Image/Output/Working/Optional/OutOptWk1Img.h>
28 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Image/Output/Working/Optional/OutOptWk2Img.h>
29 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Image/Output/Working/Optional/OutOptWk3Img.h>
30 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Image/Output/Optional/OutOptRealImg.h>
31 
32 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Value/InOptMemoryRatio.h>
33 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Value/InOptProbabilities.h>
34 
35 namespace ipsdk {
36 namespace imaproc {
37 namespace ml {
38 
41 
42 // declare processor class
43 IPSDK_DECLARE_LVL1_PROCESSOR(REP_ASYNC1, IPSDKIPLMachineLearning, PixelClassificationRFImg,
44  ipsdk::imaproc::matchSize(eMatchImageSizeType::eMIST_3d,_pInImg, _pOutBinLabImg),
45  (((ipsdk)(imaproc)(attr))(InImg))
46  (((ipsdk)(imaproc)(attr))(InRandomForestModel))
47  (((ipsdk)(imaproc)(attr))(InOptMemoryRatio))
48  (((ipsdk)(imaproc)(attr))(InOptProbabilities))
49  (((ipsdk)(imaproc)(attr))(OutOptWk1Img))
50  (((ipsdk)(imaproc)(attr))(OutOptWk2Img))
51  (((ipsdk)(imaproc)(attr))(OutOptWk3Img))
52  (((ipsdk)(imaproc)(attr))(OutBinLabImg)(customOutput)(outputBinaryLabel(_pInImg, _pInRandomForestModel)))
53  (((ipsdk)(imaproc)(attr))(OutOptRealImg)))
54 
55 // methods
56 public:
57  processor::RetrievalResult provideProcessor(const boost::shared_ptr<core::BaseAction>& pProcessor,
58  const core::BasePriority& priority,
59  core::ActionProviderPtr& pProvider);
60 
61  processor::RetrievalResult computePixelClassification(const core::BasePriority& priority, core::ActionProviderPtr& pProvider);
62 
63  processor::RetrievalResult computeGetRoiBefore(const core::BasePriority& priority, core::ActionProviderPtr& pProvider);
64 
65  processor::RetrievalResult computeGetRoiAfter(const core::BasePriority& priority, core::ActionProviderPtr& pProvider);
66 
67  processor::RetrievalResult computePutRoi(const core::BasePriority& priority, core::ActionProviderPtr& pProvider);
68 
69  processor::RetrievalResult copy(const core::BasePriority& priority, core::ActionProviderPtr& pProvider,
70  const ipsdk::image::ImageConstPtr pInImg, const ipsdk::image::ImagePtr pOutImg);
71 
72 protected:
76 
77 // attributes
78 protected:
79  ipUInt64 _numberSplit;
80  ipUInt64 _sizeSplit;
81  ipUInt64 _minY;
82  ipUInt64 _sizeY;
83  ipUInt64 _offsetBefore;
84  ipUInt64 _offsetAfter;
85  ipUInt64 _currentSplit;
86  ipUInt64 _currentProcess;
87 
88 };
89 
92 
93 } // end of namespace ml
94 } // end of namespace imaproc
95 } // end of namespace ipsdk
96 
97 #endif // __IPSDKIPLMACHINELEARNING_PIXELCLASSIFICATIONRFIMGLVL1_H__
ProcessingResult< eRetrievalResultType > RetrievalResult
IPSDK_FORCEINLINE void copy(T *dest, const T *src, ipUInt64 nbElts)
#define IPSDK_DECLARE_LVL1_PROCESSOR(ProcType, libraryName, algoName, RuleString, attributeSeq)
uint64_t ipUInt64
boost::shared_ptr< BaseImage > ImagePtr
ipsdk::core::ExecResult preProcess()
method called before processing
processor::OutputInitializerPtr customOutput(const boost::weak_ptr< OutputAttributeType > &pOutputAttribute, const CustomImageInfoPtr &pCustomImageInfo)
IPSDKIPLMACHINELEARNING_API CustomImageInfoPtr outputBinaryLabel(const ImageAttributeConstPtr &pInputAttribute, const boost::shared_ptr< const attr::InRandomForestModel > &pModel)
function allowing to create a RF output image initializer
boost::shared_ptr< const BaseImage > ImageConstPtr
boost::shared_ptr< BaseActionProvider > ActionProviderPtr
Definition of import/export macro for library.