[Insight-users] Computing the median value of a rectangular region

Françoise Lefebvre lefebvre at imnc.in2p3.fr
Mon Jun 27 05:02:00 EDT 2011


Hi,

The StatisticsImageFilter computes the mean value but not the median.

LabelMap seems rather complicated for that purpose.

I will try the std::sort function.

Thank you,

FL

Le 24/06/2011 21:43, Bradley Lowekamp a écrit :
> Hello,
>
> You could create an image of just the region you are interested with
> ExtractImageFilter, RegionOfInterestImageFilter, or CropImageFilter.
> Then use StatisticsImageFilter on that sub image.
>
> Brad
>
> On Jun 24, 2011, at 3:34 PM, Gaëtan Lehmann wrote:
>
>>
>> Le 24 juin 11 à 21:26, David Doria a écrit :
>>
>>> 2011/6/24 Neil Panjwani <paniwani at gmail.com <mailto:paniwani at gmail.com>>:
>>>> Or you could use a neighborhood iterator, which by default creates
>>>> rectangular regions, and collect the values the values that way.
>>>
>>> I imagine he's looking for a functions like:
>>>
>>> PixelType GetMedian(ImageRegion)
>>>
>>> Does anyone know if something like this exists? It seems like a
>>> reasonable request to me.
>>>
>>
>> LabelMap/LabelObject can do that.
>> It may not be easy enough to create the LabelObject corresponding to
>> the desired region though.
>>
>> Gaëtan
>>
>>
>> --
>> Gaëtan Lehmann
>> Biologie du Développement et de la Reproduction
>> INRA de Jouy-en-Josas (France)
>> tel: +33 1 34 65 29 66 fax: 01 34 65 29 09
>> http://mima2.jouy.inra.fr http://www.itk.org
>> http://www.bepo.fr
>>
>> <PGP.sig>_____________________________________
>> 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.html
>>
>> 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
>
> ========================================================
>
> Bradley Lowekamp
>
> Lockheed Martin Contractor for
>
> Office of High Performance Computing and Communications
>
> National Library of Medicine
>
> blowekamp at mail.nih.gov <mailto:blowekamp at mail.nih.gov>
>
>
>
>
>
> _____________________________________
> 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.html
>
> 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

-- 
Françoise LEFEBVRE
IMNC-Imagerie et Modélisation en Neurobiologie et Cancérologie
CNRS - UMR 8165
Campus d'Orsay - Bât 440
91405 ORSAY Cedex
Tel : 01 69 15 51 87


More information about the Insight-users mailing list