diff --git a/include/lsgrmController.txx b/include/lsgrmController.txx index 52855de31b985eb66cd3ab845f6e6dd6a4aa292a..386c510f7cb7e033d51611dd4e207b3e6f8e550c 100644 --- a/include/lsgrmController.txx +++ b/include/lsgrmController.txx @@ -92,7 +92,8 @@ void Controller<TSegmenter>::RunSegmentation() // Run first partial segmentation boost::timer t; t.restart(); - auto accumulatedMemory = RunFirstPartialSegmentation<TSegmenter>( + if (!m_Resuming) { + auto accumulatedMemory = RunFirstPartialSegmentation<TSegmenter>( m_InputImage, m_SpecificParameters, m_Threshold, @@ -104,6 +105,10 @@ void Controller<TSegmenter>::RunSegmentation() m_TileWidth, m_TileHeight, isFusion); + } else { + // temp. patch, maybe calculate real current memory after resuming graphs. + auto accumulatedMemory = 2 * m_Memory; + } #ifdef OTB_USE_MPI GatherUsefulVariables(accumulatedMemory, isFusion);