diff --git a/src/unigradicon/__init__.py b/src/unigradicon/__init__.py index 4791fb9..4b8e9a3 100644 --- a/src/unigradicon/__init__.py +++ b/src/unigradicon/__init__.py @@ -336,8 +336,8 @@ def maybe_cast(img: itk.Image): if str((type(img), itk.D)) not in itk.NearestNeighborInterpolateImageFunction.GetTypesAsList(): - if type(img) in (itk.Image[itk.SL, 3], itk.Image[itk.UL, 3]): - raise Exception("Label maps of type long or unsigned long may have values that cannot be represented in a double") + if type(img) in (itk.Image[itk.ULL, 3], itk.Image[itk.UL, 3]): + raise Exception("Label maps of type unsigned long may have values that cannot be represented in a double") maybe_cast_back = itk.CastImageFilter[itk.Image[itk.D, 3], type(img)].New()