Skip to content

Commit e52425f

Browse files
committed
Fix binarization for segmentations not using 0-1
1 parent 5632974 commit e52425f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Libs/Analyze/MeshGenerator.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#include <QMeshWarper.h>
88
#include <SurfaceReconstructor.h>
99
#include <Utils/StringUtils.h>
10+
#include <itkConstantPadImageFilter.h>
1011
#include <itkImageFileReader.h>
1112
#include <itkOrientImageFilter.h>
1213
#include <itkPoint.h>
@@ -16,7 +17,6 @@
1617
#include <vtkPolyDataNormals.h>
1718

1819
#include <QFileInfo>
19-
#include <limits>
2020

2121
namespace shapeworks {
2222

@@ -101,7 +101,7 @@ MeshHandle MeshGenerator::build_mesh_from_image(ImageType::Pointer image, float
101101
// only interested in 1's and 0's
102102
Image itk_image = Image(image);
103103
if (!itk_image.isDistanceTransform()) {
104-
itk_image.binarize(0, 1);
104+
itk_image.binarize();
105105
image = itk_image.getITKImage();
106106
}
107107

0 commit comments

Comments
 (0)