[Insight-users] Re: image Homogeniety

Luis Ibanez luis . ibanez at kitware . com
Mon, 16 Jun 2003 16:10:23 -0400


Hi Zein,

You could easily take the MeanImageFilter filter
http://www . itk . org/Insight/Doxygen/html/classitk_1_1MeanImageFilter . html
and modify its loop for computing the standard
deviation of its neighborhood, instead of computing
the mean.

This should require to modify less than ten lines of code.
(between 131 and 145).

The filter is in
Insight/Code/BasicFilters/

   itkMeanImageFilter.h
   itkMeanImageFilter.txx

This filter is using internally the Neighborhood
iterator.

You could even use the

   itkVarianceImageFunction.h
http://www . itk . org/Insight/Doxygen/html/classitk_1_1VarianceImageFunction . html

to help you in the computation of the standard
deviation so you don't even have to write the
loop for visiting all the neighbors.




Regards,


   Luis



------------

salah wrote:
> Hi Luis,
> 
> I need a Filter that calculates the the voxel-wise 
> homogeniety of an image. 
> 
> 1. Does Itk have sucha filter?
> 2. If not I would develop it myself, but I have a question
> about this. I need a filter that scans all voxels of the
> image, and at each voxel, do some calculations on the
> surrounding (kernel region) of this voxel (say for ex. in a 
> surroundign of 3x3x3 voxel). 
> what kind of iterator would you suggest me to use for
> the main iterator, and for the region-iterator?
> 
> thanks,
> Zein
> 
> 
> ->8<------------->8<------------->8<------------->8<------------->8<------------->8<-
> Zein I. Salah 
> University of Tübingen, WSI-GRIS, Sand 14, 72076 Tübingen 
> Email: salah at gris . uni-tuebingen . de
> Tel.: (07071) 29 75465 (GRIS),           Fax: (07071) 29 54 66
> 
>