Closed tdelzescaux closed 3 years ago
Can you precise please ? I don't know what you are talking about (which kind of distance map, or command, or...?)
I see... That's strange, the behavior is different in 3D, but still strange (we get negative distances). Has it always been so ? (I don't know as we use Fastmarching distance maps most of the time, nowadays)
The negative values are normal in "signed" distance mode (the default). So the problem is really that it doesn't work on 2D images. Trying older releases it seems that it was working in brainvisa 4.5, and broken in 4.6. However the code for the chamfer distance maps has not been modified for 12 years (way older than 4.5), so it's probably a subtle side effect of volume structures modification, border handling or something like that (or the random of uninitialized borders).
When creating a distance map from a 2D binary mask, only the FORWARD step is applied.