IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
SuperVoxels3dImgLvl2.h
1 // SuperVoxels3dImgLvl2.h:
3 // -----------------------
4 //
14 
15 #ifndef __IPSDKIPLADVANCEDMORPHOLOGY_SUPERVOXELS3DIMGLVL2_H__
16 #define __IPSDKIPLADVANCEDMORPHOLOGY_SUPERVOXELS3DIMGLVL2_H__
17 
21 #include <IPSDKImage/Accessor/PlanExtractor.h>
22 
23 // Attributes headers
24 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Enumerate/InOptSuperPixelsType.h>
25 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Image/Output/OutLabelImg.h>
26 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Image/Output/Working/OutWk1ColorImg.h>
27 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Image/Output/Working/OutWk1LabelImg.h>
28 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/SubImage/Input/2d/InSubColorImg2d.h>
29 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Value/InCompactness.h>
30 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Value/InNbIter.h>
31 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Value/InOptSizeRatio.h>
32 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Value/InSuperPixelsParamValue.h>
33 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/DataItem/OutSuperPixelUpdateCenters.h>
34 #include <IPSDKIPL/IPSDKIPLAttributes/DataItem/PixelsColor.h>
35 #include <IPSDKIPL/IPSDKIPLAttributes/DataItem/SizeSuperPixels.h>
36 
37 namespace ipsdk {
38 namespace imaproc {
39 namespace advmorpho {
40 
43 
44 // declare processor class
45 IPSDK_DECLARE_LVL2_PROCESSOR(REP_ASYNC1, IPSDKIPLAdvancedMorphology, SuperVoxels3dImg,
47  (((ipsdk)(imaproc)(attr))(InSubColorImg2d))
48  (((ipsdk)(imaproc)(attr))(InSuperPixelsParamValue))
49  (((ipsdk)(imaproc)(attr))(InNbIter))
50  (((ipsdk)(imaproc)(attr))(InCompactness))
51  (((ipsdk)(imaproc)(attr))(InOptSizeRatio))
52  (((ipsdk)(imaproc)(attr))(InOptSuperPixelsType))
53  (((ipsdk)(imaproc)(attr))(OutWk1ColorImg))
54  (((ipsdk)(imaproc)(attr))(OutWk1LabelImg))
55  (((ipsdk)(imaproc)(attr))(OutLabelImg)))
56 
57 // methods
58 public:
59 
60 protected:
64 
66  void initCenters();
67  void updateCenters();
68 
70  void clearIntermediateData();
71 
73  processor::RetrievalResult provideProcessor(const boost::shared_ptr<core::BaseAction>& pProcessor,
74  const core::BasePriority& priority,
75  core::ActionProviderPtr& pProvider);
76 
77  processor::RetrievalResult normalization(const core::BasePriority& priority, core::ActionProviderPtr& pProvider);
78  processor::RetrievalResult iterationSuperPixels(const core::BasePriority& priority, core::ActionProviderPtr& pProvider);
79  processor::RetrievalResult connectedComponent(const core::BasePriority& priority, core::ActionProviderPtr& pProvider);
80  processor::RetrievalResult removeSmallShape(const core::BasePriority& priority, core::ActionProviderPtr& pProvider);
81  processor::RetrievalResult watershed(const core::BasePriority& priority, core::ActionProviderPtr& pProvider);
82  processor::RetrievalResult boundaries(const core::BasePriority& priority, core::ActionProviderPtr& pProvider);
83 
84 // attributes
85 protected:
86  // declaration of dispatch results collection
88 
89  ipUInt64 _sizeSmallShape; // Size to remov small shape
90  attr::PixelsColorPtr _pPixelsColor; // List of super pixel centers
91  attr::SizeSuperPixelsPtr _pSizeSuperPixels; // List of super pixel centers
92 
94  ipsdk::image::PlanExtractor _planExtractor;
95 };
98 
99 } // end of namespace advmorpho
100 } // end of namespace imaproc
101 } // end of namespace ipsdk
102 
103 #endif // __IPSDKIPLADVANCEDMORPHOLOGY_SUPERVOXELS3DIMGLVL2_H__
Definition of import/export macro for library.
ProcessingResult< eRetrievalResultType > RetrievalResult
#define IPSDK_DECLARE_LVL2_PROCESSOR(ProcType, libraryName, algoName, RuleString, attributeSeq)
boost::shared_ptr< ipsdk::imaproc::attr::SizeSuperPixels > SizeSuperPixelsPtr
shared pointer to ipsdk::imaproc::attr::SizeSuperPixels
Definition: SizeSuperPixels.h:206
uint64_t ipUInt64
IPSDKBASEPROCESSING_API RulePtr none()
ipsdk::core::ExecResult preProcess()
method called before processing
boost::shared_ptr< ipsdk::imaproc::attr::PixelsColor > PixelsColorPtr
shared pointer to ipsdk::imaproc::attr::Pixels2d
Definition: PixelsColor.h:128
[Output] Collection of super pixel update centers
Definition: OutSuperPixelUpdateCenters.h:45
boost::shared_ptr< BaseActionProvider > ActionProviderPtr
IPSDK_DECLARE_GPU_PROCESSING_ALGORITHM(IPSDKIPLFiltering, Convolution2dImg, ipsdk::imaproc::matchSize(_pInSubGpuImg, _pOutImg),(((ipsdk)(imaproc)(attr))(InSubGpuImg))(((ipsdk)(imaproc)(attr))(InKnlXY))(((ipsdk)(imaproc)(attr))(InNormalize))(((ipsdk)(imaproc)(attr))(InConvolBorder2d))(((ipsdk)(imaproc)(attr))(OutImg))) IPSDKCUDA_DECLARE_ALGORITHM_FUNCTION_SELECTOR((InSubGpuImg)(OutImg)) public void clearIntermediateData()
method called before processing
#define IPSDK_DECLARE_DYNAMIC_RESULT_COLL(AttributeType, CollType)