[Insight-users] MedianImageFunction -- questions

Robert.Atwood at diamond.ac.uk Robert.Atwood at diamond.ac.uk
Wed Mar 16 11:40:25 EDT 2011


Hi,
I want to evaluate the median at several points in the image, rather than median filter the whole image and query those points. This would be simple if I could use itk::MedianImageFunction
However, I don't understand how to use this. How do you set the neighbourhood? 
The doxygen does not seem to show me any function for setting this, and inspecting the code I find this segment, as far as I can tell it always creates a 1x1x1 kernel? That's not what I want , do I misunderstand? The Doxygen states 

"
Calculate the median value in the neighborhood of a pixel.

Calculate the median pixel value over the standard 8, 26, etc. connected neighborhood. This calculation uses a ZeroFluxNeumannBoundaryCondition.
"

How do I access the "26,etc" neighbourhoods? Thanks
Robert


./ITK/Code/Common/itkMedianImageFunction.txx: 


 73   // Create an N-d neighborhood kernel, using a zeroflux boundary condition
 74   typename InputImageType::SizeType kernelSize;
 75   kernelSize.Fill( 1 );
 76
 77   ConstNeighborhoodIterator<InputImageType>
 78     it(kernelSize, this->GetInputImage(), this->GetInputImage()->GetBufferedRegion());
 79

-- 
This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail.
Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd. 
Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments are free from viruses and we cannot accept liability for any damage which you may sustain as a result of software viruses which may be transmitted in or with the message.
Diamond Light Source Limited (company no. 4375679). Registered in England and Wales with its registered office at Diamond House, Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom
 





More information about the Insight-users mailing list