See also <br><br>itk::ImageToParametricSpaceFilter as an example. You're most likely seeking to write a filter that derives from itk::ImageToMeshFilter.<br><br><br>-- <br>Karthik Krishnan<br>R&D Engineer,<br>Kitware Inc.
<br><br><div><span class="gmail_quote">On 11/9/07, <b class="gmail_sendername">Luis Ibanez</b> <<a href="mailto:luis.ibanez@kitware.com">luis.ibanez@kitware.com</a>> 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> <a href="http://www.itk.org/ItkSoftwareGuide.pdf">http://www.itk.org/ItkSoftwareGuide.pdf</a><br><br><br>in particular to the "Data Representation" Chapter and
<br>its section on the PointSet and the Mesh classes.<br><br><br> Regards,<br><br><br> Luis<br><br><br>----------------<br>Ali - wrote:<br>> Hi,<br>><br>> Assume an image filter which takes an ordinary gray-scale image as input
<br>> and generated a set of 'points' as output. For instance, consider a<br>> binary thresholding filter where the output is supposed to be the 2D<br>> positions or the pixel intensity of the centriods. In this case the
<br>> positions of the centriods form an irregular grid, however, this<br>> question also involves structured grids.<br>><br>> Is there any available filters in ITK which can convert an image to a<br>> grid where each grid point can hold a scalar or vector value?
<br>><br>> If not, one way of implementing this could be by using a storing the<br>> grid points in an ordinary image, where the non-grid points must be<br>> marked with a data type which is different to the pixel value type. Some
<br>> high-level languages support things like 'not-a-number' which are useful<br>> in a case like this, but I am not sure if this is supported in ITK.<br>><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>_______________________________________________<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>