isotropic expansion for a mask with anisotropic voxels

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?

Risposte (2)

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.
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

Prodotti

Release

R2024a

Richiesto:

il 23 Set 2024

Risposto:

il 25 Set 2024

Community Treasure Hunt

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

Start Hunting!

Translated by