[Insight-users] Distance map computation on an empty image

Juan Cardelino juan.cardelino at gmail.com
Fri May 7 16:42:25 EDT 2010


On Fri, May 7, 2010 at 5:28 PM, Andriy Fedorov <fedorov at bwh.harvard.edu> wrote:
> Hi,
>
> I am processing a binary image once slice at a time, and calculate
> distance transform on each slice. Naturally, some of the slices are
> empty, which brought me to this problem which I describe next.
>
> If I use Danielsson filter to compute a distance map of the image that
> is empty (all pixels are 0), I get a non-zero image, with values
> increasing from the image corner (see the result image screenshot
> here: http://dl.dropbox.com/u/3770904/dt_result_screenshot.png)


I got the same result even with a non-empty image, maybe my problem is
that the pixels I think there are white, and below some threshold and
taken as zero. But anyway, I've used the same method to generate a
couple of input masks, same images size but different contents. In one
case it works and in the other gives the same ramp as yours.

working example:
SignedDanielssonDistanceMapImageFilter example.mask.01.png map.01.mha
a.mha b.mha
non-working example:
SignedDanielssonDistanceMapImageFilter example.mask.02.png map.02.mha
a.mha b.mha

you can find both input and output images at
http://iie.fing.edu.uy/~juanc/files/tmp

Seems a bug to me too.
Regards,
                Juan


More information about the Insight-users mailing list