How to create spherical mask for all voxels of an organ

Hi,

I am trying to iterate all the voxels of an organ. For each voxel, need to create a 30 mm spherical mask and get the corresponding standard deviation. Finally pick the voxels with least standard deviation. Please guide me on the classes which can be used for this.

Thanks,
Jit

This sounds like a job for a NeighborhoodIterator. You could use ShapedNeighborhoodIterator, and provide sphere as your shape. I suspect that BinaryBallStructuringElement can be used for that purpose.

For picking voxel with lowest deviation you can use MinimumMaximumImageCalculator or NMinimaMaximaImageCalculator from ITKMontage remote module.

Also possibly look at this older mailing list discussion.