Register Pipeline Services (ProcessObjects and DataObjects)

Antoine Regimbeau requested to merge app_register_pipeline into develop


Creation of new services in the Application class. Pipeline can now be registered at the end of the DoExecute() with the method RegisterPipeline(). A new method FreeRessources can called on class Application, and a private virtual method DoFreeRessources can be overridden in class MyApp : public Application.


It allows filters of application to survive the end of the DoExecute scope if they are not members. Plus it allows a better control over memory. FreeRessources is called at the end of Application::ExecuteAndWriteOutput but can be called on Application whenever the developer wants to. See issue #1514.

Implementation Details

In both functions a deep first search algorithm has been implemented.

Classes and files

Both methods are in the Application class and only FreeRessources method is in the SWIG file:

M       Modules/Wrappers/ApplicationEngine/include/otbWrapperApplication.h
M       Modules/Wrappers/ApplicationEngine/src/otbWrapperApplication.cxx
M       Modules/Wrappers/SWIG/src/otbApplication.i

In order to provide a method to get object of an ObjectList as a DataObject an ObjectListInterface class has been created and take care of the problem :

M       Modules/Core/ObjectList/include/otbObjectList.h
M       Modules/Core/ObjectList/include/otbObjectList.txx
A       Modules/Core/ObjectList/include/otbObjectListInterface.h

A new method has been created in InputImageParameter to get the pointer toward the image it is holding :

M       Modules/Wrappers/ApplicationEngine/include/otbWrapperInputImageParameter.h


RegisterPipeline has been used in some applications of ImageUtils Module with few modification of the application, and also on the LargeScaleMeanShift app in order to prove the concept on composite application.

M       Modules/Applications/AppImageUtils/app/otbCompareImages.cxx
M       Modules/Applications/AppImageUtils/app/otbConcatenateImages.cxx
M       Modules/Applications/AppImageUtils/app/otbExtractROI.cxx
M       Modules/Applications/AppImageUtils/app/otbQuicklook.cxx
M       Modules/Applications/AppImageUtils/app/otbRescale.cxx
M       Modules/Applications/AppImageUtils/app/otbSplitImage.cxx
M       Modules/Applications/AppImageUtils/app/otbTileFusion.cxx
M       Modules/Applications/AppSegmentation/app/otbLSMSSegmentation.cxx
M       Modules/Applications/AppSegmentation/app/otbMeanShiftSmoothing.cxx


No test for those features.


Code documentation

Edited by Guillaume Pasero

Merge request reports