InsightSoftwareConsortium / InsightSoftwareConsortium/ITK

Should SignedMaurerDistanceMapImageFilter accept non-floating outputs? Docs says so?

Open
#2,893 5 comments 0 reactions 0 assignees View on GitHub
status:Use_Milestone_Backlog
Dominant language
C++
Stars
1.7k
Forks
748
Avg merge
1d 1h
Merged PRs (30d)
64

Description

From the documentation of SignedMaurerDistanceMapImageFilter, I was understanding that its perfectly valid to use output images of integral type. Quoting from the docs (emphasis mine):

To maintain integer arithmetic within the filter, the default output is the signed squared distance. This implies that the input image should be of type "unsigned int" or "int" whereas the **output image is of type "int"**. Obviously, if the user wishes to utilize the image spacing or to have a filter with the Euclidean distance (as opposed to the squared distance), output image types of float or double should be used.

However I fail to compile when the output image type is not a floating point type. I think this is due to the following concept check:
https://github.com/InsightSoftwareConsortium/ITK/blob/047fa6934ac32711d1d7b84fa6eb81c72db01960/Modules/Filtering/DistanceMap/include/itkSignedMaurerDistanceMapImageFilter.h#L160

Am I doing something wrong? Is this supposed to work?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.