[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 10:49:16 -0400


MedianImageFunction is what you want.  Your code will look something like this...

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);

-----Original Message-----
From: Bjorn Hanch Sollie [mailto:bhs@pvv.org]
Sent: Tuesday, July 30, 2002 5:43 PM
To: insight-users
Subject: [Insight-users] Finding the median of the neighborhood of a
pixel


Hi all!

Does ITK contain any functionality for finding the median of the
standard 9, 27, etc. neighborhood of a pixel?  I've been looking at
MedianImageFunction, but couldn't figure out how to use it for this
purpose.  Also the SmartNeighborhoodIterator uses similar
neighborhoods, but it doesn't have a method for calculating the median
as far as I can see.  Not that it's so hard to implement this myself,
but I just thought I'd check if what I'm looking for is already in
there somewhere first.

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

_______________________________________________
Insight-users mailing list
Insight-users@public.kitware.com
http://public.kitware.com/mailman/listinfo/insight-users