Commit 68eaa698 authored by Gaetano Raffaele's avatar Gaetano Raffaele
Browse files

Working on the resume option to resume segmentation after fail or abort.

No related merge requests found
Showing with 4 additions and 2 deletions
+4 -2
...@@ -92,8 +92,10 @@ void Controller<TSegmenter>::RunSegmentation() ...@@ -92,8 +92,10 @@ void Controller<TSegmenter>::RunSegmentation()
// Run first partial segmentation // Run first partial segmentation
boost::timer t; t.restart(); boost::timer t; t.restart();
auto accumulatedMemory = 0;
if (!m_Resuming) { if (!m_Resuming) {
auto accumulatedMemory = RunFirstPartialSegmentation<TSegmenter>( accumulatedMemory = RunFirstPartialSegmentation<TSegmenter>(
m_InputImage, m_InputImage,
m_SpecificParameters, m_SpecificParameters,
m_Threshold, m_Threshold,
...@@ -107,7 +109,7 @@ void Controller<TSegmenter>::RunSegmentation() ...@@ -107,7 +109,7 @@ void Controller<TSegmenter>::RunSegmentation()
isFusion); isFusion);
} else { } else {
// temp. patch, maybe calculate real current memory after resuming graphs. // temp. patch, maybe calculate real current memory after resuming graphs.
auto accumulatedMemory = 2 * m_Memory; accumulatedMemory = 2 * m_Memory;
} }
#ifdef OTB_USE_MPI #ifdef OTB_USE_MPI
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment