[Insight-users] SignedDanielssonDistanceMapImageFilter and ContourExtractor2DImageFilter

Juan Cardelino juan.cardelino at gmail.com
Wed Jul 13 12:53:09 EDT 2011


I don't think so, but for me it works. You could try to my program
directly with your images and see what happens. If you get more than 1
contour with your image and my code, maybe is an issue of your image.
Whats the type and bit-depth of your images? Will it be possible that
you are running into a quatization issue?
In my case, I'm working with float images to represent distance maps
and they are computed with the SignedDanielssonDistanceMapImageFilter,
so I see no difference there.

Another thing you could try to dissect the problem and find its
source,  is to compute the contour using another method. See for
instance this example:
https://iie.fing.edu.uy/avn/misc_projects/examples/itk/shape/ZeroContourLevelSet.cxx
where I compute the resulting contour as a binary image. As there I'm
not using the ContourExtractor, it could tell you if the problem comes
from there or not.

If you want I could test your code with my images and see what happens.

BTW, if you want to test how I compute the distance maps, you could
use: https://iie.fing.edu.uy/avn/misc_projects/examples/itk/shape/SignedDanielssonDistanceMapImageFilter2.cxx

I hope this helps.
Let me know.

On Wed, Jul 13, 2011 at 9:19 AM, David Doria <daviddoria at gmail.com> wrote:
> On Wed, Jul 13, 2011 at 8:11 AM, Juan Cardelino
> <juan.cardelino at gmail.com> wrote:
>> David,
>>        Please look at the attached example. This program takes a
>> distance map and an image, computes the zero level set of the distance
>> map and overlays it over the image. It is used to show segmentation
>> results. Look at the part that I extract the contour and it will
>> answer your question.
>> I will contribute this one later on, because I also ran into trouble
>> when trying to use the ContourExtractorFilter.
>> I hope this helps.
>> Regards,
>>             Juan
>
> Hm, the only difference I see is that you called:
>
>        extractor->VertexConnectHighPixelsOff();
>        extractor->ReverseContourOrientationOff();
>
> which didn't seem to change anything in my example? Am I missing something else?
>
> David
>


More information about the Insight-users mailing list