isotropic expansion for a mask with anisotropic voxels

2 visualizaciones (últimos 30 días)
Farah
Farah el 23 de Sept. de 2024
Respondida: Farah el 25 de Sept. de 2024
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?

Respuestas (2)

Image Analyst
Image Analyst el 25 de Sept. de 2024
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 el 25 de Sept. de 2024
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

Productos


Versión

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by