Commit 60b9057a authored by Pierre Lassalle's avatar Pierre Lassalle

Generic Region Merging format

parent 98a7cf2f
......@@ -21,12 +21,12 @@ else()
message(STATUS "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support. Please use a different C++ compiler.")
endif()
set(GRM_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src/)
#set(GRM_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src/)
include_directories(${GRM_INCLUDE_DIR})
#include_directories(${GRM_INCLUDE_DIR})
project(GRM)
project(OTBGRM)
set(GRM_LIBRARIES GRM)
set(OTBGRM_LIBRARIES OTBGRM)
otb_module_impl()
OTB_CREATE_APPLICATION(NAME otbGRM
SOURCES otbGRM.cxx
LINK_LIBRARIES ${${otb-module}_LIBRARIES}
OTB_CREATE_APPLICATION(NAME GenericRegionMerging
SOURCES GenericRegionMerging.cxx
LINK_LIBRARIES ${OTBGRM_LIBRARIES}
)
......@@ -24,32 +24,33 @@
#include "grmFullLambdaScheduleSegmenter.h"
#include "grmBaatzSegmenter.h"
#include "otbWrapperApplication.h"
#include "otbWrapperApplicationFactory.h"
namespace otb
{
namespace Wrapper
{
class otbGRM : public Application
class GenericRegionMerging : public Application
{
public:
typedef otbGRM Self;
typedef GenericRegionMerging Self;
typedef itk::SmartPointer<Self> Pointer;
typedef FloatVectorImageType ImageType;
typedef UInt32ImageType LabelImageType;
itkNewMacro(Self);
itkTypeMacro(otbGRM, otb::Application);
itkTypeMacro(GenericRegionMerging, otb::Application);
private:
void DoInit()
{
SetName("otbGRM");
SetName("GenericRegionMerging");
SetDescription("This application allows to use the Generic Region Merging library (GRM) and provides currently 3 homogeneity criteria: Euclidean Distance, Full Lambda Schedule and Baatz & Schape criterion.");
AddParameter(ParameterType_InputImage, "in", "Input Image");
AddParameter(ParameterType_OutputFilename, "out", "Ouput Label Image");
AddParameter(ParameterType_OutputImage, "out", "Ouput Label Image");
AddParameter(ParameterType_Choice, "criterion", "Homogeneity criterion to use");
AddChoice("criterion.bs", "Baatz & Schape");
......@@ -172,4 +173,4 @@ namespace otb
} // end of namespace otb
OTB_APPLICATION_EXPORT(otb::Wrapper::otbGRM)
OTB_APPLICATION_EXPORT(otb::Wrapper::GenericRegionMerging)
set(${otb-module}_SRC
grmBaatzSegmenter.txx
grmFullLambdaScheduleSegmenter.txx
grmGraphOperations.txx
grmGraphToOtbImage.txx
set(OTBGRM_SRC
grmNeighborhood.cxx
grmSpringSegmenter.txx
lpContour.cxx
)
add_library(${otb-module} ${${otb-module}_SRC})
target_link_libraries(${otb_module} ${OTBCommon_LIBRARIES})
add_library(OTBGRM ${OTBGRM_SRC})
target_link_libraries(OTBGRM ${OTBCommon_LIBRARIES})
otb_module_target(${otb-module})
otb_module_target(OTBGRM)
otb_module_test()
otb_test_application(NAME apGRM_BaatzCriterion
APP otbGRM
APP GenericRegionMerging
OPTIONS -in ${INPUTDATA}/QB_Toulouse_Ortho_XS.tif
-out ${TEMP}/apGRMLabeledImage.tif int16
-criterion bs
......@@ -11,7 +11,7 @@ otb_test_application(NAME apGRM_BaatzCriterion
)
otb_test_application(NAME apGRM_EuclideanDistanceCriterion
APP otbGRM
APP GenericRegionMerging
OPTIONS -in ${INPUTDATA}/QB_Toulouse_Ortho_XS.tif
-out ${TEMP}/apGRMLabeledImage.tif int16
-criterion ed
......@@ -19,7 +19,7 @@ otb_test_application(NAME apGRM_EuclideanDistanceCriterion
)
otb_test_application(NAME apGRM_FullLambdaScheduleCriterion
APP otbGRM
APP GenericRegionMerging
OPTIONS -in ${INPUTDATA}/QB_Toulouse_Ortho_XS.tif
-out ${TEMP}/apGRMLabeledImage.tif int16
-criterion fls
......@@ -27,7 +27,7 @@ otb_test_application(NAME apGRM_FullLambdaScheduleCriterion
)
otb_test_application(NAME apGRM_BaatzCriterionWithSpeed
APP otbGRM
APP GenericRegionMerging
OPTIONS -in ${INPUTDATA}/QB_Toulouse_Ortho_XS.tif
-out ${TEMP}/apGRMLabeledImage.tif int16
-speed 1
......@@ -38,7 +38,7 @@ otb_test_application(NAME apGRM_BaatzCriterionWithSpeed
)
otb_test_application(NAME apGRM_EuclideanDistanceCriterionWithSpeed
APP otbGRM
APP GenericRegionMerging
OPTIONS -in ${INPUTDATA}/QB_Toulouse_Ortho_XS.tif
-out ${TEMP}/apGRMLabeledImage.tif int16
-speed 1
......@@ -47,7 +47,7 @@ otb_test_application(NAME apGRM_EuclideanDistanceCriterionWithSpeed
)
otb_test_application(NAME apGRM_FullLambdaScheduleCriterionWithSpeed
APP otbGRM
APP GenericRegionMerging
OPTIONS -in ${INPUTDATA}/QB_Toulouse_Ortho_XS.tif
-out ${TEMP}/apGRMLabeledImage.tif int16
-speed 1
......@@ -56,7 +56,7 @@ otb_test_application(NAME apGRM_FullLambdaScheduleCriterionWithSpeed
)
otb_test_application(NAME apGRM_BaatzCriterionWithFixedNumberOfIterations
APP otbGRM
APP GenericRegionMerging
OPTIONS -in ${INPUTDATA}/QB_Toulouse_Ortho_XS.tif
-out ${TEMP}/apGRMLabeledImage.tif int16
-niter 75
......@@ -67,7 +67,7 @@ otb_test_application(NAME apGRM_BaatzCriterionWithFixedNumberOfIterations
)
otb_test_application(NAME apGRM_EuclideanDistanceCriterionWithFixedNumberOfIterations
APP otbGRM
APP GenericRegionMerging
OPTIONS -in ${INPUTDATA}/QB_Toulouse_Ortho_XS.tif
-out ${TEMP}/apGRMLabeledImage.tif int16
-niter 75
......@@ -76,7 +76,7 @@ otb_test_application(NAME apGRM_EuclideanDistanceCriterionWithFixedNumberOfItera
)
otb_test_application(NAME apGRM_FullLambdaScheduleCriterionWithFixedNumberOfIterations
APP otbGRM
APP GenericRegionMerging
OPTIONS -in ${INPUTDATA}/QB_Toulouse_Ortho_XS.tif
-out ${TEMP}/apGRMLabeledImage.tif int16
-niter 75
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment