diff --git a/Modules/Applications/AppDimensionalityReduction/app/otbDimensionalityReduction.cxx b/Modules/Applications/AppDimensionalityReduction/app/otbDimensionalityReduction.cxx index 06e07d00ad394a5f89004263db84829073823cd1..2359b00bb607bffa6255433f345a1588c952e26a 100644 --- a/Modules/Applications/AppDimensionalityReduction/app/otbDimensionalityReduction.cxx +++ b/Modules/Applications/AppDimensionalityReduction/app/otbDimensionalityReduction.cxx @@ -169,6 +169,8 @@ private: SetParameterDescription("outmatrix", "Filename to store the transformation matrix (csv format)"); MandatoryOff("outmatrix"); + AddRAMParameter(); + // Doc example parameter settings SetDocExampleParameterValue("in", "cupriteSubHsi.tif"); SetDocExampleParameterValue("out", "FilterOutput.tif"); @@ -420,7 +422,8 @@ private: m_MinMaxFilter = MinMaxFilterType::New(); m_MinMaxFilter->SetInput(m_ForwardFilter->GetOutput()); - m_MinMaxFilter->GetStreamer()->SetNumberOfLinesStrippedStreaming(50); + //m_MinMaxFilter->GetStreamer()->SetNumberOfLinesStrippedStreaming(50); + m_MinMaxFilter->GetStreamer()->SetAutomaticAdaptativeStreaming(GetParameterInt("ram")); AddProcess(m_MinMaxFilter->GetStreamer(), "Min/Max computing"); m_MinMaxFilter->Update(); diff --git a/Modules/Applications/AppImageUtils/app/otbColorMapping.cxx b/Modules/Applications/AppImageUtils/app/otbColorMapping.cxx index 37d55102e538f1be969756ead476735f1deccf4a..aded04dc11ae89144c2937131465c6fa81e80d22 100644 --- a/Modules/Applications/AppImageUtils/app/otbColorMapping.cxx +++ b/Modules/Applications/AppImageUtils/app/otbColorMapping.cxx @@ -293,8 +293,6 @@ private: SetParameterDescription("out","Output image filename"); SetDefaultOutputPixelType("out",ImagePixelType_uint8); - AddRAMParameter(); - // --- OPERATION --- : Label to color / Color to label AddParameter(ParameterType_Choice, "op", "Operation"); SetParameterDescription("op","Selection of the operation to execute (default is : label to color)."); @@ -384,6 +382,7 @@ private: SetMinimumParameterIntValue("method.image.up", 0); SetMaximumParameterIntValue("method.image.up", 100); + AddRAMParameter(); // Doc example parameter settings SetDocExampleParameterValue("in", "ROI_QB_MUL_1_SVN_CLASS_MULTI.png"); @@ -611,6 +610,8 @@ private: m_StatisticsMapFromLabelImageFilter = StreamingStatisticsMapFromLabelImageFilterType::New(); m_StatisticsMapFromLabelImageFilter->SetInput(GetParameterImage("method.image.in")); m_StatisticsMapFromLabelImageFilter->SetInputLabelImage(m_CasterToLabelImage->GetOutput()); + m_StatisticsMapFromLabelImageFilter->GetStreamer()->SetAutomaticAdaptativeStreaming(GetParameterInt("ram")); + AddProcess(m_StatisticsMapFromLabelImageFilter->GetStreamer(), "Computing statistics on labels..."); m_StatisticsMapFromLabelImageFilter->Update(); StreamingStatisticsMapFromLabelImageFilterType::MeanValueMapType diff --git a/Modules/Applications/AppImageUtils/app/otbCompareImages.cxx b/Modules/Applications/AppImageUtils/app/otbCompareImages.cxx index 7cc5fec08428478bb239073828e314cc96e7d24f..aaf58e8cd175f7cc3278fcf68d33fe60ebbc2c77 100644 --- a/Modules/Applications/AppImageUtils/app/otbCompareImages.cxx +++ b/Modules/Applications/AppImageUtils/app/otbCompareImages.cxx @@ -114,6 +114,8 @@ private: SetParameterDescription("count", "Nb of pixels which are different"); SetParameterRole("count", Role_Output); + AddRAMParameter(); + // Doc example parameter settings SetDocExampleParameterValue("ref.in", "GomaApres.png"); SetDocExampleParameterValue("ref.channel", "1"); @@ -206,6 +208,8 @@ private: m_CompareFilter->SetInput1(m_ExtractRefFilter->GetOutput()); m_CompareFilter->SetInput2(m_ExtractMeasFilter->GetOutput()); m_CompareFilter->SetPhysicalSpaceCheck(false); + m_CompareFilter->GetStreamer()->SetAutomaticAdaptativeStreaming(GetParameterInt("ram")); + AddProcess(m_CompareFilter->GetStreamer(), "Comparing..."); m_CompareFilter->Update(); // Show result diff --git a/Modules/Applications/AppSegmentation/app/otbLSMSSmallRegionsMerging.cxx b/Modules/Applications/AppSegmentation/app/otbLSMSSmallRegionsMerging.cxx index 23f33978594b6c16e37190d2e30f9b3bed16ae20..5adea92933da93767bde59b94d11a5bcd955d694 100644 --- a/Modules/Applications/AppSegmentation/app/otbLSMSSmallRegionsMerging.cxx +++ b/Modules/Applications/AppSegmentation/app/otbLSMSSmallRegionsMerging.cxx @@ -108,6 +108,8 @@ private: SetDefaultParameterInt("tilesizey", 500); SetMinimumParameterIntValue("tilesizey", 1); + AddRAMParameter(); + // Doc example parameter settings SetDocExampleParameterValue("in","smooth.tif"); SetDocExampleParameterValue("inseg","segmentation.tif"); @@ -142,6 +144,8 @@ private: StatisticsImageFilterType::Pointer stats = StatisticsImageFilterType::New(); stats->SetInput(labelIn); + stats->GetStreamer()->SetAutomaticAdaptativeStreaming(GetParameterInt("ram")); + AddProcess(stats->GetStreamer(), "Retrieve region count..."); stats->Update(); unsigned int regionCount=stats->GetMaximum(); diff --git a/Modules/Applications/AppSegmentation/app/otbLSMSVectorization.cxx b/Modules/Applications/AppSegmentation/app/otbLSMSVectorization.cxx index 9a0c070e995925392b067ed4d42508694f0b2151..9238a008f50a8854024946dbb50933b38823dcb3 100644 --- a/Modules/Applications/AppSegmentation/app/otbLSMSVectorization.cxx +++ b/Modules/Applications/AppSegmentation/app/otbLSMSVectorization.cxx @@ -94,6 +94,8 @@ private: SetDefaultParameterInt("tilesizey", 500); SetMinimumParameterIntValue("tilesizey", 1); + AddRAMParameter(); + // Doc example parameter settings SetDocExampleParameterValue("in","avions.tif"); SetDocExampleParameterValue("inseg","merged.tif"); @@ -129,6 +131,8 @@ private: StatisticsImageFilterType::Pointer stats = StatisticsImageFilterType::New(); stats->SetInput(labelIn); + stats->GetStreamer()->SetAutomaticAdaptativeStreaming(GetParameterInt("ram")); + AddProcess(stats->GetStreamer(), "Retrieve region count..."); stats->Update(); unsigned int regionCount=stats->GetMaximum(); diff --git a/Modules/Applications/AppStereo/app/otbStereoRectificationGridGenerator.cxx b/Modules/Applications/AppStereo/app/otbStereoRectificationGridGenerator.cxx index de20a9b507a1cad27f6888c89661f46eb280e3b3..6517ccd8455844cfc1c3dce56bbda0177679e318 100644 --- a/Modules/Applications/AppStereo/app/otbStereoRectificationGridGenerator.cxx +++ b/Modules/Applications/AppStereo/app/otbStereoRectificationGridGenerator.cxx @@ -239,7 +239,8 @@ private: m_DEMToImageGenerator->AboveEllipsoidOn(); m_StatisticsFilter->SetInput(m_DEMToImageGenerator->GetOutput()); - AddProcess(m_StatisticsFilter,"Computing DEM statistics ..."); + m_StatisticsFilter->GetStreamer()->SetAutomaticAdaptativeStreaming(GetParameterInt("ram")); + AddProcess(m_StatisticsFilter->GetStreamer(),"Computing DEM statistics ..."); m_StatisticsFilter->Update(); otb::DEMHandler::Instance()->SetDefaultHeightAboveEllipsoid(m_StatisticsFilter->GetMean());