[Insight-users] Where is the Polygon Scan Converter?

Frank Miller frankmiller at jhu.edu
Mon Oct 24 10:47:06 EDT 2005


James,

Thanks for the reply.  I knew there must be a way to do this with code 
currently in the library.

The polygon scan converter code crashed for me too until I made a few 
changes. I haven't taken the time to really understand what was wrong 
and what I did but it seems to work for me now.  If I find some free 
time I might take a closer look at what I did and if it turns out to 
actually be a solution Ill submit a patch.

For now Im going to give your suggestion a try because I am interested 
in trying it in the 3D case and speed is not critical to my application.

Thanks again,

Frank

Miller, James V (Research) wrote:
> Frank,
> 
> The polygon scan converter code needed some work before it could be
> incorporated into the toolkit. I tried to do it quickly before the 
> last release but couldn't finish it in time.  It currently crashes
> when I try to use it.  
> 
> I will try to get this operational and included in the toolkit for
> the next release which is scheduled for the end of November.
> 
> A brute force way to do what you want is to construct a PolygonSpatialObject
> and use a SpatialObjectToImageFilter to generate the initial implicit
> function.  This is not very efficient when polygon is small relative 
> to the size of image, but it will do what you need.
> 
> Jim
> 
> 
> 
> -----Original Message-----
> From: insight-users-bounces+millerjv=crd.ge.com at itk.org
> [mailto:insight-users-bounces+millerjv=crd.ge.com at itk.org]On Behalf Of
> Frank Miller
> Sent: Friday, October 21, 2005 10:16 AM
> To: insight-users at itk.org
> Subject: [Insight-users] Where is the Polygon Scan Converter?
> 
> 
> Greetings,
> 
> Im using level set methods to work on a segmentation problem and wrote a 
> little function that I think this community would be interested in.
> 
> Problem
> -------
> 
> The standard way to generate an initial implicit function is to create a 
> distance map from a set of seed points using the FastMarchingImageFilter 
> or the DanielssonDistanceMapImageFilter. It would be nice to be able to 
> generate the initial implicit function given a level set. In other 
> words, to have a method to generate an implicit function that has an 
> arbitrary polygon for its zero level set.
> 
> Solution
> --------
> 
> I would expect many people would want to implement something like this 
> and it is possible the solution is already in ITK and I just have not 
> found it.  If this is the case, please point me in the right direction.
> 
> My solution is to create an image with zeros everywhere outside the 
> polygon, and non-zeros inside the polygon, and feed this to the 
> SignedDanielssonDistanceMapImageFilter.  I generate this binary image 
> from a polygon scan conversion iterator written by Benjamin King and 
> submitted in this post.
> 
> http://public.kitware.com/pipermail/insight-users/2005-June/013614.html
> 
> Questions
> ---------
> 
> The code for the polygon scan conversion iterator does not seem to be in 
> the library (I checked the 2.0.0 release and the current version in 
> CVS).  Has the name been changed or has it not been integrated yet?
> 
> Does someone need to volunteer to add this code to the library?  I might 
> be able to do this.
> 
> Frank
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users


More information about the Insight-users mailing list