3D dilation of a nifti file

3 次查看(过去 30 天)
elisa scaccianoce
elisa scaccianoce 2013-8-22
Hi, I`m trying to manipulate a nifti file. In particular I have a 3D spot that I dilated with the function imdilate(), but I saw that it works only in 2 dimensions (x and y plans). Is there a function that does the same in 3 dimensions?
Thank you
elisa

回答(1 个)

Mark
Mark 2013-8-26
imgDilated = imdilate( img, structuringElement )
If you use a 3D array as a structuring element (for example, ones(3,3,3)), imdilate will work on 3D images (see http://www.mathworks.com/matlabcentral/newsreader/view_thread/66040).
I don't know whether it is possible to create a structuring element in 3D using the function strel. This is not in the documentation, so I doubt it. But it's not very difficult to make your own '3D-ball-shaped' structuring element. (Please note that strel('ball',N,R) is not a 3D-ball in this sense: it just refers to the fact that the generated structuring element is not 'flat', but has height differences).
Mark

类别

Help CenterFile Exchange 中查找有关 Geology 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by