[Insight-users] SignedDanielssonDistanceMapImageFilter

chensiqi pidanchen at hotmail.com
Wed Dec 10 14:56:28 EST 2008


Hi, GhassanThanks for the advice.  I flip the input.The result now is both inside and outside are positive  :(I use float type as the filteroutput instead of "unsigned short" in the example. I also tried unsigned short, the result is the same.
 
Here is part of my code. 
////////////////////////////////////////////////////////////////////////////////////////////////////
typedef itk::Image< unsigned char, 2 > BinaryImageType;
typedef itk::Image< float , 2> LSVImageType;
typedef itk::SignedDanielssonDistanceMapImageFilter < BinaryImageFilter, LSVImageFilter >  FilterType;
FilterType::Pointer filter = FilterType::New();
 
filter ->SetInput ( contour );  // contour is the binary image with BinaryImageType,  1 at boundary points, and 0 elsewhere.
 
LSVImageFilter::Pointer LSVImage = filter->GetDistanceMap();
 
Display (LSVImage) // this is a function that displays the image.
//////////////////////////////////////////////////////////////////////////////////////////////////////
 
I notice when I   cout<<LSV_image->GetBufferedRegion().GetSize() , the output is [0,0].   I guess there is something wrong in my code that causes this weird output size.  I can display LSVImage, although both inside and outside region are postive.
 
Thanks for any inputSiqi> CC: insight-users at itk.org> From: hamarneh at gmail.com> To: pidanchen at hotmail.com> Subject: Re: [Insight-users] SignedDanielssonDistanceMapImageFilter> Date: Tue, 9 Dec 2008 20:45:19 -0800> > Hello Siqi,> > You write: "The input is only a binary image with boundary points at > 0, and all other points at 1."> However, according to he documentation: "As a convention, the distance > is evaluated from the boundary of the ON pixels."> (from http://www.itk.org/Doxygen/html/classitk_1_1SignedDanielssonDistanceMapImageFilter.html > )> So, your input image should have boundary pixels set to 1 and all > other points to 0 (and not the other way around).> HTH,> /Ghassan> > > > On 9-Dec-08, at 7:24 PM, chensiqi wrote:> > >> > Hi, ITKers> >> > I got two questions regarding SignedDanielssonDistanceMapImageFilter.> >> > 1. The result I have is not "signed", both the inside and outside > > distance values are negative. The input is only a binary image with > > boundary points at 0, and all other points at 1. I was wondering > > how I was wondering how SignedDanielssonDistanceMapImageFilter > > determine the region of inside and outside.> >> > 2. In Examples of SignedDanielssonDistanceMapImageFilter. cxx, I > > notice that the OutputImageType of filter is unsigned short, which I > > don't quite understand. The output should contains both negative > > and positive distance, why use "unsigned" here?> >> > Thanks> > Siqi> >> > MSN保护盾,十八般武艺保障MSN安全! 现 > > 在就下载! _______________________________________________> > Insight-users mailing list> > Insight-users at itk.org> > http://www.itk.org/mailman/listinfo/insight-users> 
_________________________________________________________________
新版手机MSN,新功能,新体验!满足您的多彩需求!
http://mobile.msn.com.cn
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20081211/d7587af2/attachment.htm>


More information about the Insight-users mailing list