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

Ali - saveez at hotmail.com
Sat Nov 10 14:02:44 EST 2007


Luis and Karthik,

Thanks for the hints.

(1) Both of the filters that you pointed out were drived from itk::ImageToMeshFilter, where one of them (itk::BinaryMaskToNarrowBandPointSetFilter) seems to make no use of mesh and is effectively an image-to-pointset filter. Just for the sake of efficiency, is there reasons at all for not having an itk::ImageToPointset super-class?

(2) Consider a 2D gray-scale image of 512 x 512 size and assume that we want to 'sample' this image by smaller sub-regions of, say, 32 x 32 size and find, say, the mean value of pixels inside these sub-regions and store the result in a point located in the centre of the sub-region. The sub-regions may be overlapped, eg by 50% or so. Moreover, each point should store the information about the sub-region it represents, eg by an itk::ImageRegion type. I am not sure if having the use of itk::Mesh and its cells would be of help in designing such a filter. Could you confirm that there is no similar filter that 'samples' sub-regions and calculates and stores some statistics in the way described here? The closest that I could find was the label objects statistics descriptors submitted to IJ by Gaëtan Lehmann, however, labels are a little bit different creatures compared to the discussed overlapped sub-regions.

> 
> 
> 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

_________________________________________________________________
Feel like a local wherever you go.
http://www.backofmyhand.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20071110/5c7d4ff2/attachment.htm


More information about the Insight-users mailing list