isotropic expansion for a mask with anisotropic voxels

2 次查看(过去 30 天)
Hello,
I'm trying to expand my mask by 2 mm in all direction ( isotropic expansion) but my voxels are anisotropic ( x and y are the same but the z is higher [0.9,0.9,4] ). how I do this 2 mm expansion wihtout changing the volume of my mask?

回答(2 个)

Image Analyst
Image Analyst 2024-9-25
I'm not sure how many voxels per mm you have. Is 0.9 mm the voxel width? You can use imdilate but be aware that you'll probably have quantization effects if 2 mm is not an integer number of voxels.

Farah
Farah 2024-9-25
i did used imdilate. I created an isotrpic space with 1x1x1
vox_a = voxelSize; % Original voxel size (anisotropic)
vox_b = [1, 1, 1]; % Set isotropic voxel size to [1, 1, 1] in mm
then I created the original and isotropic grids using meshgrid then I resampled the original mask to isotropic grid using interp3 then I wanted to expand in this new isotropic space and I used imdilate; stepSize_mm = 2;
stepSize_pixels = round(stepSize_mm / vox_b(1))
D_isotropic = imdilate(D_isotropic, strel('sphere', stepSize_pixels)); but yet when I calculate the radius of the expansion is not 2 mm

产品


版本

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by