<html><head><style type='text/css'>p { margin: 0; }</style></head><body><div style='font-family: Times New Roman; font-size: 12pt; color: #000000'>
Hum, too heavy for me.<br>
<br>
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.<br>
<br>
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.<br>
<br>
But...<br>
<br>
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).<br>
<br>
Do I still need to have the first filter propagating the requested
region ?<br>
<br>
Thanks<br>
<br>
Cyrille<br>
<br>
Le 29/05/2012 02:11, Luis Ibanez a écrit :
<blockquote cite="mid:CABAUzPpoWMgJsuTNyrzOCxmoP24EYgt+LMyRE3qU+uVQD2tSFw@mail.gmail.com">Hi Cyrille,<br>
<br>
<br>
mm, not quite the way to you describe it,...<br>
<br>
but,... <br>
<br>
I'm wondering if you may find useful the<br>
Label Statistics image filter, <br>
<br>
<br>
that will compute statistics from an image <br>
by segregating them according to the labels<br>
of another image.<br>
<br>
You could then do this in parallel, if you<br>
happen to mark your regions with lablels<br>
in advance.<br>
<br>
<br>
You have this one:<br>
<a href="http://www.itk.org/Doxygen/html/classitk_1_1LabelStatisticsImageFilter_1_1LabelStatistics.html" target="_blank">http://www.itk.org/Doxygen/html/classitk_1_1LabelStatisticsImageFilter_1_1LabelStatistics.html</a><br>
<br>
<br>
and this one:<br>
<a href="http://www.itk.org/Doxygen/html/itkLabelImageToStatisticsLabelMapFilter_8h_source.html" target="_blank">http://www.itk.org/Doxygen/html/itkLabelImageToStatisticsLabelMapFilter_8h_source.html</a><br>
<br>
<br>
<br>
Luis<br>
<br>
<br>
----------------------------------<br>
<div class="gmail_quote">On Mon, May 21, 2012 at 6:59 AM, Cyrille
Faucheux <span dir="ltr"><<a href="mailto:cyrille.faucheux@etu.univ-tours.fr" target="_blank">cyrille.faucheux@etu.univ-tours.fr</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
I want to compute statistics (lets say for example, an
histogram) on a region of an image.<br>
<br>
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.<br>
<br>
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) ?<br>
<br>
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).<br>
<br>
Thanks in advance.<br>
<br>
Cyrille<br>
_____________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Kitware offers ITK Training Courses, for more information
visit:<br>
<a href="http://www.kitware.com/products/protraining.php" target="_blank">http://www.kitware.com/products/protraining.php</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at:<br>
<a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
</blockquote>
</div>
<br>
</blockquote>
</div></body></html>