[Insight-users] Finding the median of the neighborhood of a p ixel

Bjorn Hanch Sollie bhs at pvv . org
Thu, 1 Aug 2002 17:08:03 +0200 (CEST)


On Thu, 1 Aug 2002, Miller, James V (Research) wrote:

> itk::MedianImageFunction::Pointer  median = itk::MedianImageFunction::New();
> median->SetInputImage(someImage);
> itk::Index<2> index;
> index[0] = 13;
> index[1] = 200;
> double medianValue;
> medianValue = median->Evaluate(index);

Thanks for the response, James!

I thought about doing this, but how do I specify the neighborhood I
want to use?  In this particular case, how do I calculate the median
of a 3x3 or 5x5 neighborhood of the pixel at (13,200)?  To me, the
above code looks as if it uses the largest possible neighborhood
regardless.

-Bjorn
-- 
The History of the Universe
Chapter 1: Bang!  Chapter 2: Sss...  Chapter 3: Crunch!
The End