[Insight-users] Newbie question: How to create polygons?

Luis Ibanez luis.ibanez at kitware.com
Sat Mar 21 11:49:09 EDT 2009


Hi Benjamin,


               Welcome to ITK !


You can extract contours from a binary image (your .png file)
by using the filter:
http://www.itk.org/Insight/Doxygen/html/classitk_1_1ContourExtractor2DImageFilter.html

---

However, from the description of your email, there seems to be
a confusion between your goals and your means:

Is it your final purpose:

  A) To extract the individual shapes into separate image files ?

or is it

  B) To identify the polygonal representation of the shapes in
     the input image ?


If your goal is (A), then what you need is simply a pipeline
with the following filters:

     * ConnectedComponents
     * BinaryThreshold
     * RegionOfInterest

If you goal is (B), then, you can use the ContourExtractor2D described
above and then you can use Fourier descriptors in order to identify
polygonal shapes in the output of this filter.


Please separate your real goal from the means that you have
planned to use, so that we can better advise you on what ITK
components to use.



       Thanks


           Luis



--------------------
Jazz Kartell wrote:
> Hi to everyone,
> 
> I'm completely new to ITK, so please be lenient toward me...
> At the moment i'm very overhelmed with all the functionality included in 
> ITK.
> 
> So here is what i want to do:
> 
> Input is a simple .png file including black filled forms on white 
> background.
> Goal is to extract these forms in seperate files (one for each form).
> The extracted region should be included in a polygon with predefined 
> amount of vertices.
> 
> Could you give me an advice, how i can enclose regions in polygons?
> 
> Thank you very much in advance
> 
> Best regards
> 
> Benjamin Kirchholtes
> 
> 
> _____________________________________
> 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
> 


More information about the Insight-users mailing list