[Insight-users] SignedDanielssonDistanceMap: squared distances inexact?

Luis Ibanez luis.ibanez at kitware.com
Tue Jul 28 07:31:13 EDT 2009


Hi Lynx,

Could you please list the colors of the blobs that surround the "dark red"
blob that you are concerned about ?

Just by looking at the image: blobs_ws03.tif

it is not obvious which of the blobs is the one that doesn't seem to
produce the correct output.


Pixel coordinates (or an annotated image) will be very helpful too...


      Thanks


            Luis


--------------------------------------------
On Sun, Jul 26, 2009 at 4:09 PM, <lynx.abraxas at freenet.de> wrote:

> 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
>
>
>
>
>
>
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20090728/315b8940/attachment.htm>


More information about the Insight-users mailing list