Skip to content

Commit

Permalink
Merge pull request #1074 from SylvainGerbaud/dev
Browse files Browse the repository at this point in the history
[MPI] fix image spacing implicit triangulation in 1d and 2d cases
  • Loading branch information
julien-tierny authored Jan 8, 2025
2 parents f16b6d2 + 9acfcbc commit cca502d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions core/vtk/ttkAlgorithm/ttkTriangulationFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,12 @@ RegistryTriangulation
double spacing[3];
image->GetSpacing(spacing);

// 1D (not tested)
if(!spacing[1] && !spacing[2])
spacing[1] = 1;
if(!spacing[2]) // 2D (tested)
spacing[2] = 1;

int dimensions[3];
image->GetDimensions(dimensions);

Expand Down

0 comments on commit cca502d

Please sign in to comment.