New definition of module list in ModuleFactory
This commit is contained in:
+15
-9
@@ -12,22 +12,18 @@ set(plaYUver_Mod_SRCS
|
||||
|
||||
MACRO(ADD_MODULE name file )
|
||||
set(__modulename "Module${name}")
|
||||
OPTION(MODULE_${name} "Use module ${name}" ON )
|
||||
OPTION(MODULE_${name} "Use module ${name}" ON )
|
||||
ADD_FEATURE_INFO(${name} MODULE_${name} "Module ${name}" )
|
||||
if( MODULE_${name} )
|
||||
list(APPEND plaYUver_Mod_SRCS ${file} )
|
||||
LIST(APPEND MODULES_LIST ${name} )
|
||||
LIST(APPEND MODULES_LIST_NAME ${name} )
|
||||
LIST(APPEND MODULES_LIST_FILES ${file} )
|
||||
file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/ModulesListHeader.h "#include \"${file}.h\"\n")
|
||||
endif()
|
||||
unset(__modulename)
|
||||
ENDMACRO()
|
||||
|
||||
|
||||
file( WRITE ${CMAKE_CURRENT_BINARY_DIR}/ModulesListHeader.h "// This files add the header files of each module\n"
|
||||
|
||||
"#ifndef __MODULESLISTHEADER_H__\n#define __MODULESLISTHEADER_H__\n" )
|
||||
|
||||
|
||||
#
|
||||
# Modules List
|
||||
#
|
||||
@@ -52,9 +48,19 @@ ENDIF()
|
||||
|
||||
|
||||
#
|
||||
# Finish header
|
||||
# Create header
|
||||
#
|
||||
file( APPEND ${CMAKE_CURRENT_BINARY_DIR}/ModulesListHeader.h "#endif // __MODULESLISTHEADER_H__\n" )
|
||||
file( WRITE ${CMAKE_CURRENT_BINARY_DIR}/ModulesListHeader.h "// This files add the header files of each module\n"
|
||||
|
||||
"#ifndef __MODULESLISTHEADER_H__\n#define __MODULESLISTHEADER_H__\n" )
|
||||
foreach(module ${MODULES_LIST_FILES} )
|
||||
file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/ModulesListHeader.h "#include \"${module}.h\"\n")
|
||||
endforeach(module_Name)
|
||||
file( APPEND ${CMAKE_CURRENT_BINARY_DIR}/ModulesListHeader.h "#define REGISTER_ALL_MODULES \\\n" )
|
||||
foreach(module ${MODULES_LIST_NAME} )
|
||||
file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/ModulesListHeader.h "Register( \"${module}\", &(${module}::Create) ); \\\n")
|
||||
endforeach(module_Name)
|
||||
file( APPEND ${CMAKE_CURRENT_BINARY_DIR}/ModulesListHeader.h "\n#endif // __MODULESLISTHEADER_H__\n" )
|
||||
|
||||
INCLUDE_DIRECTORIES( ${OpenCV_INCLUDE_DIRS} )
|
||||
ADD_LIBRARY( PlaYUVerModules ${plaYUver_Mod_SRCS} )
|
||||
|
||||
@@ -36,24 +36,7 @@ namespace plaYUVer
|
||||
|
||||
PlaYUVerModuleFactory::PlaYUVerModuleFactory()
|
||||
{
|
||||
Register( "FilterComponentLuma", &FilterComponentLuma::Create );
|
||||
Register( "FilterComponentChromaU", &FilterComponentChromaU::Create );
|
||||
Register( "FilterComponentChromaV", &FilterComponentChromaV::Create );
|
||||
Register( "AbsoluteFrameDifference", &AbsoluteFrameDifference::Create );
|
||||
Register( "FrameDifference", &FrameDifference::Create );
|
||||
Register( "FrameMask", &FrameMask::Create );
|
||||
Register( "SetChromaHalfScale", &SetChromaHalfScale::Create );
|
||||
Register( "FrameCrop", &FrameCrop::Create );
|
||||
Register( "FrameBinarization", &FrameBinarization::Create );
|
||||
Register( "FrameShift", &FrameShift::Create );
|
||||
Register( "EightBitsSampling", &EightBitsSampling::Create );
|
||||
Register( "LumaAverage", &LumaAverage::Create );
|
||||
Register( "WeightedPSNR", &WeightedPSNR::Create );
|
||||
#ifdef USE_OPENCV
|
||||
//Register( "DisparityStereoVar", &DisparityStereoVar::Create );
|
||||
Register( "DisparityStereoBM", &DisparityStereoBM::Create );
|
||||
Register( "DisparityStereoSGBM", &DisparityStereoSGBM::Create );
|
||||
#endif
|
||||
REGISTER_ALL_MODULES
|
||||
}
|
||||
|
||||
PlaYUVerModuleFactory::~PlaYUVerModuleFactory()
|
||||
|
||||
Reference in New Issue
Block a user