[Insight-users] Filters for converting images to regular or irregular grids

Luis Ibanez luis.ibanez at kitware.com
Fri Nov 9 15:42:26 EST 2007


Hi Ali,

Yes there are ITK filters that take as input an itkImage
and produce a PointSet as output.

See for example:

itkBinaryMaskToNarrowBandPointSetFilter
http://www.itk.org/Insight/Doxygen/html/classitk_1_1BinaryMaskToNarrowBandPointSetFilter.html

the itkPointSet class has data associated to points and data associated
to cells. The type of the data is one of the template parameters defined
in the MeshTraits.


Note that in this case, the output is a topologically disconnected
set of points, but you could have created cells between these points
and generated an itkMesh instead.

You may want to look a the souce code of this filter
in Code/BasicFilters

and to look at the ITK Software Guide


     http://www.itk.org/ItkSoftwareGuide.pdf


in particular to the "Data Representation" Chapter and
its section on the PointSet and the Mesh classes.


    Regards,


       Luis


----------------
Ali - wrote:
> Hi,
> 
> Assume an image filter which takes an ordinary gray-scale image as input 
> and generated a set of 'points' as output. For instance, consider a 
> binary thresholding filter where the output is supposed to be the 2D 
> positions or the pixel intensity of the centriods. In this case the 
> positions of the centriods form an irregular grid, however, this 
> question also involves structured grids.
> 
> Is there any available filters in ITK which can convert an image to a 
> grid where each grid point can hold a scalar or vector value?
> 
> If not, one way of implementing this could be by using a storing the 
> grid points in an ordinary image, where the non-grid points must be 
> marked with a data type which is different to the pixel value type. Some 
> high-level languages support things like 'not-a-number' which are useful 
> in a case like this, but I am not sure if this is supported in ITK.
> 
> _______________________________________________
> 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