From 9e545f06e2196fcbbb4a0dfd7eb00077d3314147 Mon Sep 17 00:00:00 2001 From: haaput Date: Sun, 15 Dec 2019 12:24:20 +0530 Subject: [PATCH] BUG: fix AxisSize when final dimension is 1 --- include/itkTileConfiguration.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/itkTileConfiguration.h b/include/itkTileConfiguration.h index 683730c9..752f8685 100644 --- a/include/itkTileConfiguration.h +++ b/include/itkTileConfiguration.h @@ -201,7 +201,11 @@ struct ITK_TEMPLATE_EXPORT TileConfiguration Tiles.push_back(tile); line = getNextNonCommentLine(tileFile); } - AxisSizes[Dimension - 1] = cInd[Dimension - 1] + 1; + + for (unsigned d = 0; d < Dimension; ++d) + { + AxisSizes[d] = cInd[d] + 1; + } size_t expectedSize = this->LinearSize(); itkAssertOrThrowMacro(expectedSize == Tiles.size(),