[Insight-users] SignedDanielssonDistanceMap: squared distances inexact?
lynx.abraxas at freenet.de
lynx.abraxas at freenet.de
Sun Jul 26 16:09:55 EDT 2009
Dear Dan Mueller,
Thank You for Your quick reply with the examples.
What I still wonder is why I don't get 2 when I ask the
SignedDanielssonDistanceMap for squared distance output. Squared distances
should be always integers (if I'm not mistaken) and should go in the tif
unmodified (eg. 2).
Anyway, I changed my intermediat pixel format to float and the output of a
single white pixel is as I'd expect.
However if I run my little watershed test program there is one blob (dark red
blobl in blobs_ws03.tif) that is surrounded by four split blobs but itself is
not split although it has some crease. I even made the effort to count the
pixels by hand. The minima-line is 8 pixels off the rim in horizontal
direction. Now accounting for the additional distance to the left up to the
end of the minima-line I'd say the gray values should decrease further since
the distanc to the left has to be added to the 8 pixels up or down.But still
blobs_rm01.tif has just one minimum. Are my expectations wrong here?
I ran my test prog like this for the pics in the tbz (h-min height= 0, all
fully connectd):
watershed05b blobs.tif blobs_sddm_01.vtk blobs_hm01.tif blobs_rm01.tif blobs_cc01.tif blobs_ws01.tif blobs_ws02.tif blobs_ws03.tif 0 1 1
Thanks for hints or help
Lynx
On 26/07/09 15:33:53, Dan Mueller wrote:
> Hi Lynx,
>
> The SignedDanielssonDistanceMap will perform the distance computation
> using real (ie. float/double) precision. If the output is integer (ie.
> signed short in your case) it will cast the result. The corner pixels
> (which you expect to be 2) are actual sqrt(2) = 1.414, which when cast
> to signed short come out as 1.
>
> Please find attached an input image for which the floating point
> signed distance (InsideIsPositive=False) has been computed -- the
> result is as expected.
>
> HTH
>
> Cheers, Dan
>
> 2009/7/26 <lynx.abraxas at freenet.de>:
> > Hello!
> >
> >
> > Using the SignedDanielssonDistanceMap and squared distances (signed short as
> > output) I wonder why a distance of 2 has the same grey value as the distance
> > 1.
> > eg. input image (x white, space black):
> > | |
> > | x |
> > | |
> >
> > The relative distance map I get looks like:
> > |111|
> > |1x1|
> > |111|
> >
> > I'd expect:
> > |212|
> > |1x1|
> > |212|
> >
> > Is my expactation wrong or is the SignedDanielssonDistanceMapImageFilter not
> > that accurate? Would flout as output and not squared distances exchage the 2s
> > by sqrt(2)?
> >
> > Thanks for any hint or help
> > Lynx
-------------- next part --------------
A non-text attachment was scrubbed...
Name: watershed_test05b.tbz
Type: application/octet-stream
Size: 55378 bytes
Desc: not available
URL: <http://www.itk.org/pipermail/insight-users/attachments/20090726/b8345043/attachment-0001.obj>
More information about the Insight-users
mailing list