[Insight-users] Computing statistics on a region of an image
Cyrille Faucheux
cyrille.faucheux at etu.univ-tours.fr
Tue Jun 5 05:15:17 EDT 2012
Hum, too heavy for me.
So, in my filter that computes the statistics on a region of an image, I've declared a function to specify the region to process. This filter extends ProcessObject. It works.
To do things right, do I need to override GenerateInputRequestedRegion() (which by default, set the requested region to the largest possible region). Logically, I do.
But...
This filter may later also be used in a composite filter, whose purpose is to compute for each pixel on an image statistics on a region centered on this pixel. This filter will generate a VectorImage, so it will extend ImageToImageFilter, and will automatically take advantage of the streaming mecanism (through the output of the filter, which is an image, and has a requested region). But since my filter that is inside the composite one will specify for each processed pixel a new requested region, I have the impression that something is wrong (since the region processed by the composite filter is still the region specified by the output image).
Do I still need to have the first filter propagating the requested region ?
Thanks
Cyrille
Le 29/05/2012 02:11, Luis Ibanez a écrit :
Hi Cyrille,
mm, not quite the way to you describe it,...
but,...
I'm wondering if you may find useful the
Label Statistics image filter,
that will compute statistics from an image
by segregating them according to the labels
of another image.
You could then do this in parallel, if you
happen to mark your regions with lablels
in advance.
You have this one:
http://www.itk.org/Doxygen/html/classitk_1_1LabelStatisticsImageFilter_1_1LabelStatistics.html
and this one:
http://www.itk.org/Doxygen/html/itkLabelImageToStatisticsLabelMapFilter_8h_source.html
Luis
----------------------------------
On Mon, May 21, 2012 at 6:59 AM, Cyrille Faucheux < cyrille.faucheux at etu.univ-tours.fr > wrote:
<blockquote>
Hi,
I want to compute statistics (lets say for example, an histogram) on a region of an image.
With an ImageToImageFilter, I know I have to specify the requested region at the end of my pipeline, and everything gets magically propagated upstream through the pipeline.
Is there a generic way of doing this with a filter that do not produce an image, or should the filter handle the region of interest "manually" (with internal region iterators) ?
Note: I dont want to use a RegionOfInterestImageFilter nor an ExtractImageFilter because it's too heavy (because later I will need to compute lots of statistics on lots of tiny region of my image).
Thanks in advance.
Cyrille
_____________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.php
Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ
Follow this link to subscribe/unsubscribe:
http://www.itk.org/mailman/listinfo/insight-users
</blockquote>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20120605/94605793/attachment.htm>
More information about the Insight-users
mailing list