Hi Simon,
> I am sorry but I have another question rather than an answer to this issue.
> Masking with the unsmoothed image will not preserve totals because those
> elements smoothed outside the mask will be subsequently masked away and
> converted to NaNs. Does anybody know a way around this issue. In
> particular dealing with data with large lesions. If you mask the lesion out
> then the non-lesion voxels resulting from smoothing will be affected by
> zeros. If you leave the lesion in then the smoothed results will be
> affected by misclassified lesion voxels.
I once fiddled with this and the solution actually Ged came up with was
> - create an image with zeros (not NaNs), and smooth this as usual.
> - now binarize this image, and smooth this version as usual (the result of this will be 1 everywhere where the kernel didn't include any zeros, and a reduced value where it did.
> - divide (voxelwise) the first smoothed image by the second, this should effectively be equivalent to the renormalisation of the kernel mentioned above (I think/hope!). You will get NaNs where the kernel fell entirely on zeros, but these will be overwritten when you...
> - replace output voxels with the original values in your masked regions.
If I remember correctly, this "undoes" the loss of signal that occurs by
"smoothing into the mask". I had this coded up at one point, although I
am not sure where I left it. Let me know if you want to look into this
further, and I will see if I can find it again.
Best,
Marko
--
=====================================================================
Marko Wilke (Dr.med./M.D.)
[log in to unmask]
Universitäts-Kinderklinik University Children's Hospital
Abt. III (Neuropädiatrie) Dept. III (Pediatric neurology)
Hoppe-Seyler-Str. 1, D - 72076 Tübingen
Tel.: (+49) 07071 29-83416 Fax: (+49) 07071 29-5473
=====================================================================
|