isotropic expansion for a mask with anisotropic voxels

조회 수: 4 (최근 30일)
Farah
Farah 2024년 9월 23일
답변: Farah 2024년 9월 25일
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