Improvements on CalypModuleIf

Add type safe flags
Replace MACRO with templates (WIP)
This commit is contained in:
2021-10-19 23:42:18 +01:00
parent 09ec5213c3
commit 93cf60e34a
43 changed files with 209 additions and 183 deletions
@@ -33,15 +33,15 @@ AbsoluteFrameDifferenceExample::AbsoluteFrameDifferenceExample()
/* Module Definition */
m_iModuleAPI = CLP_MODULE_API_2; // Use API version 2 (recommended).
// See this example for details on the functions prototype
m_iModuleType = CLP_FRAME_PROCESSING_MODULE; // Apply module to the frames or to the whole sequence.
m_iModuleType = ClpModuleType::FrameProcessing; // Apply module to the frames or to the whole sequence.
m_pchModuleCategory = "Measurements"; // Category (sub-menu)
m_pchModuleName = "AbsoluteDifferenceExample"; // Name
m_pchModuleLongName = "Absolute Difference Example"; // Name
m_pchModuleTooltip = "Measure the absolute difference " // Description
"between two images (Y plane), e. g., abs( Y1 - Y2 )";
m_uiNumberOfFrames = 2; // Number of Frames required (ONE_FRAME, TWO_FRAMES, THREE_FRAMES)
m_uiModuleRequirements = CLP_MODULE_REQUIRES_NEW_WINDOW; // Module requirements (check CalypModulesIf.h).
// Several requirements should be "or" between each others.
m_uiNumberOfFrames = 2; // Number of Frames required (ONE_FRAME, TWO_FRAMES, THREE_FRAMES)
m_uiModuleRequirements = ClpModuleFeature::NewWindow; // Module requirements (check CalypModulesIf.h).
// Several requirements should be "or" between each others.
m_pcFrameDifference = NULL;
}
+2 -2
View File
@@ -29,13 +29,13 @@ REGISTER_CLASS_MAKER( FrameBinarizationAPIv1 )
FrameBinarizationAPIv1::FrameBinarizationAPIv1()
{
/* Module Definition */
m_iModuleType = CLP_FRAME_PROCESSING_MODULE;
m_iModuleType = ClpModuleType::FrameProcessing;
m_pchModuleCategory = "Utilities";
m_pchModuleName = "FrameBinarizationAPIv1";
m_pchModuleLongName = "Frame Binarization API v1";
m_pchModuleTooltip = "Binarize frame";
m_uiNumberOfFrames = 1;
m_uiModuleRequirements = CLP_MODULE_REQUIRES_OPTIONS;
m_uiModuleRequirements = ClpModuleFeature::Options;
m_cModuleOptions.addOptions() /**/
( "threshold", m_uiThreshold, "Threshold level for binarization (0-255) [128]" );