From ce4354e0c51144c366d9632cde03708fe63b15db Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?C=C3=A9dric=20Traizet?= <cedric.traizet@c-s.fr>
Date: Mon, 20 May 2019 15:14:02 +0200
Subject: [PATCH] ENH: add ram parameter

---
 .../app/otbTrainImagesRegression.cxx                  | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/Modules/Applications/AppClassification/app/otbTrainImagesRegression.cxx b/Modules/Applications/AppClassification/app/otbTrainImagesRegression.cxx
index 59163b9146..1917749332 100644
--- a/Modules/Applications/AppClassification/app/otbTrainImagesRegression.cxx
+++ b/Modules/Applications/AppClassification/app/otbTrainImagesRegression.cxx
@@ -56,7 +56,8 @@ private:
 
         "The training vector data must contain polygons corresponding to the input sampling positions. This data "
         "is used to extract samples using pixel values in each band of the predictor image and the corresponding "
-        "ground truth extracted from the lagel image.\n\n"
+        "ground truth extracted from the lagel image. If no training vector data is provided, the samples will be "
+        "extracted on the full image extent.\n\n"
 
         "At the end of the application, the mean square error between groundtruth and predicted values is computed using "
         "the output model and the validation vector data. Note that if no validation data is given, the training data "
@@ -336,6 +337,9 @@ protected:
     AddApplication("PolygonClassStatistics", "polystat", "Polygon analysis");
     AddApplication("MultiImageSamplingRate", "rates", "Sampling rates");
 
+    AddApplication("SampleSelection", "select", "Sample selection");
+    AddApplication("SampleExtraction", "extraction", "Sample extraction");
+    
     AddParameter(ParameterType_Group, "sample", "Sampling parameters");
     SetParameterDescription("sample", "This group of parameters allows setting sampling parameters");
 
@@ -347,8 +351,9 @@ protected:
     SetParameterDescription("sample.nv", "Number of validation samples.");
     MandatoryOff("sample.nv");
 
-    AddApplication("SampleSelection", "select", "Sample selection");
-    AddApplication("SampleExtraction", "extraction", "Sample extraction");
+    ShareParameter( "ram", "polystat.ram" );
+    Connect( "select.ram", "polystat.ram" );
+    Connect( "extraction.ram", "polystat.ram" );
   }
 
   /** Init Learning applications and share learning parameters */
-- 
GitLab