See also <br><br>itk::ImageToParametricSpaceFilter as an example. You&#39;re most likely seeking to write a filter that derives from itk::ImageToMeshFilter.<br><br><br>-- <br>Karthik Krishnan<br>R&amp;D Engineer,<br>Kitware Inc.
<br><br><div><span class="gmail_quote">On 11/9/07, <b class="gmail_sendername">Luis Ibanez</b> &lt;<a href="mailto:luis.ibanez@kitware.com">luis.ibanez@kitware.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>Hi Ali,<br><br>Yes there are ITK filters that take as input an itkImage<br>and produce a PointSet as output.<br><br>See for example:<br><br>itkBinaryMaskToNarrowBandPointSetFilter<br><a href="http://www.itk.org/Insight/Doxygen/html/classitk_1_1BinaryMaskToNarrowBandPointSetFilter.html">
http://www.itk.org/Insight/Doxygen/html/classitk_1_1BinaryMaskToNarrowBandPointSetFilter.html</a><br><br>the itkPointSet class has data associated to points and data associated<br>to cells. The type of the data is one of the template parameters defined
<br>in the MeshTraits.<br><br><br>Note that in this case, the output is a topologically disconnected<br>set of points, but you could have created cells between these points<br>and generated an itkMesh instead.<br><br>You may want to look a the souce code of this filter
<br>in Code/BasicFilters<br><br>and to look at the ITK Software Guide<br><br><br>&nbsp;&nbsp;&nbsp;&nbsp; <a href="http://www.itk.org/ItkSoftwareGuide.pdf">http://www.itk.org/ItkSoftwareGuide.pdf</a><br><br><br>in particular to the &quot;Data Representation&quot; Chapter and
<br>its section on the PointSet and the Mesh classes.<br><br><br>&nbsp;&nbsp;&nbsp;&nbsp;Regards,<br><br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Luis<br><br><br>----------------<br>Ali - wrote:<br>&gt; Hi,<br>&gt;<br>&gt; Assume an image filter which takes an ordinary gray-scale image as input
<br>&gt; and generated a set of &#39;points&#39; as output. For instance, consider a<br>&gt; binary thresholding filter where the output is supposed to be the 2D<br>&gt; positions or the pixel intensity of the centriods. In this case the
<br>&gt; positions of the centriods form an irregular grid, however, this<br>&gt; question also involves structured grids.<br>&gt;<br>&gt; Is there any available filters in ITK which can convert an image to a<br>&gt; grid where each grid point can hold a scalar or vector value?
<br>&gt;<br>&gt; If not, one way of implementing this could be by using a storing the<br>&gt; grid points in an ordinary image, where the non-grid points must be<br>&gt; marked with a data type which is different to the pixel value type. Some
<br>&gt; high-level languages support things like &#39;not-a-number&#39; which are useful<br>&gt; in a case like this, but I am not sure if this is supported in ITK.<br>&gt;<br>&gt; _______________________________________________
<br>&gt; Insight-users mailing list<br>&gt; <a href="mailto:Insight-users@itk.org">Insight-users@itk.org</a><br>&gt; <a href="http://www.itk.org/mailman/listinfo/insight-users">http://www.itk.org/mailman/listinfo/insight-users
</a><br>_______________________________________________<br>Insight-users mailing list<br><a href="mailto:Insight-users@itk.org">Insight-users@itk.org</a><br><a href="http://www.itk.org/mailman/listinfo/insight-users">http://www.itk.org/mailman/listinfo/insight-users
</a><br></blockquote></div><br>