<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'><div style="text-align: left;"><br></div>Luis and Karthik,<br><br>Thanks for the hints.<br><br>(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?<br><br>(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 <span class="weak-color">Gaëtan Lehmann, however, labels are a little bit different creatures compared to the discussed overlapped sub-regions.</span><br><br>> <br>> <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>> http://www.itk.org/Insight/Doxygen/html/classitk_1_1BinaryMaskToNarrowBandPointSetFilter.html<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>> http://www.itk.org/ItkSoftwareGuide.pdf<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>> > Insight-users@itk.org<br>> > http://www.itk.org/mailman/listinfo/insight-users<br><br /><hr />Do you know a place like the back of your hand? Share local knowledge with <a href='http://www.backofmyhand.com' target='_new'>BackOfMyHand.com</a></body>
</html>