Hi,
For the built-in kernels, which are all normalised to sum to 1.0, there
is no difference between -fmean and -fmeanu. The latter is in there
for non-normalisable user-specified kernels (like many derivative
operators).
To avoid letting the background pull down your result you need to
basically normalise a filtered version of the non-zero mask.
That is:
fslmaths img1 -bin mask1
fslmaths img1 -kernel gauss 3.0 -fmean img2
fslmaths mask1 -kernel gauss 3.0 -fmean mask2
fslmaths img2 -div mask2 img3
Here img3 is now the filtered version, but only using values that
reside within the mask (mask1), thus not smoothing across the
boundary.
All the best,
Mark
On 25 Jun 2009, at 08:30, Raymond Salvador wrote:
> Dear members of the FSL list,
>
> I'm applying a spatial Gaussian filter on an image through the
> following command:
>
> fslmaths img1 -kernel gauss 3.0 -fmean img2
>
> and the voxels near the edge are given lower values, as the
> background zeros are included in the filtering. I have tried the
> option -fmeanu but it leads to very similar results. I wonder if
> there is any way to avoid this lowering due to background (somehow
> discarding background values in the filtering).
>
> Thank you very much in advance,
>
> Raymond Salvador
>
>
|