Commit a8984a3b authored by Gaetano Raffaele's avatar Gaetano Raffaele
Browse files

FIX: cast to float when estimating minimum number of tiles

Showing with 1 addition and 1 deletion
+1 -1
...@@ -326,7 +326,7 @@ void Controller<TSegmenter>::GetAutomaticConfiguration() ...@@ -326,7 +326,7 @@ void Controller<TSegmenter>::GetAutomaticConfiguration()
// Actually, there is tile margins. And the best scenario is to have // Actually, there is tile margins. And the best scenario is to have
// square tiles with margin = width/2, that is tiles 4x larger. // square tiles with margin = width/2, that is tiles 4x larger.
// Hence the number of tiles maximizing memory use is 4x larger. // Hence the number of tiles maximizing memory use is 4x larger.
unsigned int minimumNumberOfTiles = std::ceil(4 * nbOfNodesInImage / ((float) maximumNumberOfNodesInMemory)); unsigned int minimumNumberOfTiles = std::ceil(4.0 * ((float) nbOfNodesInImage) / ((float) maximumNumberOfNodesInMemory));
itkDebugMacro(<<"Minimum number of tiles is " << minimumNumberOfTiles); itkDebugMacro(<<"Minimum number of tiles is " << minimumNumberOfTiles);
// In the following steps, we will optimize tiling layout, starting from a number // In the following steps, we will optimize tiling layout, starting from a number
......
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