diff --git a/Example/CMakeLists.txt b/Example/CMakeLists.txt index 04e9d75bd3adeff1b372e410a14b0c646db67f5f..30232f6ae2f2e16849e026564dca20163ecb779d 100644 --- a/Example/CMakeLists.txt +++ b/Example/CMakeLists.txt @@ -1,4 +1,5 @@ include(WrapperMacros) OTB_CREATE_APPLICATION(NAME Addition SOURCES otbAddition.cxx) -OTB_CREATE_APPLICATION(NAME Smoothing SOURCES otbSmoothing.cxx) \ No newline at end of file +OTB_CREATE_APPLICATION(NAME Smoothing SOURCES otbSmoothing.cxx) +OTB_CREATE_APPLICATION(NAME TestApplication SOURCES otbTestApplication.cxx) \ No newline at end of file diff --git a/Example/otbTestApplication.cxx b/Example/otbTestApplication.cxx new file mode 100644 index 0000000000000000000000000000000000000000..bbbba192f8fd152ef731fcf86e46329b4c5146bc --- /dev/null +++ b/Example/otbTestApplication.cxx @@ -0,0 +1,85 @@ +/*========================================================================= + + Program: ORFEO Toolbox + Language: C++ + Date: $Date$ + Version: $Revision$ + + + Copyright (c) Centre National d'Etudes Spatiales. All rights reserved. + See OTBCopyright.txt for details. + + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + + =========================================================================*/ +#include "otbWrapperApplication.h" +#include "otbWrapperApplicationFactory.h" + +namespace otb +{ +namespace Wrapper +{ + +class TestApplication : public Application +{ +public: + /** Standard class typedefs. */ + typedef TestApplication Self; + typedef Application Superclass; + typedef itk::SmartPointer<Self> Pointer; + typedef itk::SmartPointer<const Self> ConstPointer; + + /** Standard macro */ + itkNewMacro(Self); + + itkTypeMacro(TestApplication, otb::Application); + +private: + TestApplication() + { + SetName("TestApplication"); + SetDescription("This application demonstrate the use of all parameters types"); + + std::cout << ">>>>>>>>>>>>>> TestApplication" << std::endl; + } + + virtual ~TestApplication() + { + std::cout << ">>>>>>>>>>>>>> ~TestApplication" << std::endl; + } + + void DoCreateParameters() + { + std::cout << "TestApplication::DoCreateParameters" << std::endl; + AddParameter(ParameterType_Empty, "boolean", "Boolean"); + AddParameter(ParameterType_Int, "int", "Integer"); + AddParameter(ParameterType_Float, "float", "Float"); + AddParameter(ParameterType_String, "string", "String"); + AddParameter(ParameterType_Filename, "filename", "File name"); + AddParameter(ParameterType_Directory, "directory", "Directory name"); + AddParameter(ParameterType_InputImage, "inputimage", "Input Image"); + AddParameter(ParameterType_InputComplexImage, "inputcompleximage", "Input Complex Image"); + AddParameter(ParameterType_InputVectorData, "inputvectordata", "Input Vector Data"); + AddParameter(ParameterType_OutputImage, "outputimage", "Output Image"); + AddParameter(ParameterType_OutputVectorData, "outputvectordata", "Output Vector Data"); + AddParameter(ParameterType_Radius, "radius", "Radius"); + //AddParameter(ParameterType_Group, "group", "Group"); + } + + void DoUpdateParameters() + { + std::cout << "TestApplication::DoUpdateParameters" << std::endl; + } + + void DoExecute() + { + std::cout << "TestApplication::DoExecute" << std::endl; + } +}; +} +} + +OTB_APPLICATION_EXPORT(otb::Wrapper::TestApplication)