[Insight-users] Finding the median of the neighborhood of a p
ixel
Miller, James V (Research)
millerjv at crd . ge . com
Thu, 1 Aug 2002 11:53:57 -0400
We would have to add a method to the MedianImageFunction to set the
radii of the neighborhood used for the calculation.
Lines 74-75 of itkMedianImageFunction.txx hard wire a 3x3x3x.... neighorhood.
So we just need a Set/Get method in the header to set the kernel size and then
use use that size in line 78 and remove lines 74-75
-----Original Message-----
From: Bjorn Hanch Sollie [mailto:bhs@pvv.org]
Sent: Thursday, August 01, 2002 11:08 AM
To: Miller, James V (Research)
Cc: insight-users
Subject: RE: [Insight-users] Finding the median of the neighborhood of a
p ixel
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