Ask an expert. Trust the answer.

Your academic and career questions answered by verified experts

Converting non-isotropic to isotropic voxel

Date: 2023-01-14 14:36:27

I am trying to register two brain image volumes (each includes 2D slices). The first volume (target or moving volume) has the slice thickness and spacing of 1.5 and [1.5 1.5] respectively. For the second one (reference volume), these values are 4 and [0.9375 0.9375]. Also the number of slices are different. First volume has 96 slices and second has 44 slices.

One of my friends, suggested to make the voxels isotropic, but I do not know how to do that. I can see that first volume is isotropic, but not the second one. I am wondering how I should do that?

Also, I will consider two slices of each volume and apply a feature extraction method on it. So, both of these slices should be related to the same layer of the brain (same scene). Considering the different number of slices, what should I do and how should I re-calculate new slices of the first volume to be the same as the second volume?

Expert Answer:

:

If I understand your problem correctly, it's sounds like you want to take an image stack with voxels of a given size interpolate it so that you define a new coordinate system in which each voxel is isotropic (i.e. has equal height width and depth, i.e. cubic voxels). If so might the help:

(I'm using matlabs supplied mri data as an example)

 

load mri D
D=double(squeeze(D));   % remove singleton dimension, convert to double
szD_a=size(D);          % get size of original image stack
vox_a = [.4, .4, .45];  % define size of voxel in original image stack
vox_b = [.25, .25, .25];% define size of voxel in target image stack
szD_b = ceil((size(D)-1).*vox_a./vox_b)+1; % set size of target image stack

% define coordinates of voxels in original image stack
[Xa,Ya,Za]=meshgrid(...
    [0:szD_a(1)-1]*vox_a(1),...
    [0:szD_a(2)-1].*vox_a(2),...
    [0:szD_a(3)-1].*vox_a(3));

% define coordinates of voxels in original image stack
[Xb,Yb,Zb]=meshgrid(...
    [0:szD_b(1)-1]*vox_b(1),...
    [0:szD_b(2)-1].*vox_b(2),...
    [0:szD_b(3)-1].*vox_b(3));

D_target = interp3(Xa,Ya,Za,D,Xb,Yb,Zb);

figure
for t=0:vox_b(3):max(Zb(:))
    subplot(1,2,1)
    imagesc(D(:,:,floor(t/vox_a(3))+1))
    subplot(1,2,2)
    imagesc(D_target(:,:,floor(t/vox_b(3))+1))
    drawnow
    pause(0.1)
end

 

Why Matlabhelpers ?

Looking for reliable MATLAB assignment help? Our expert MATLAB tutors deliver high-quality, easy-to-understand solutions tailored to your academic needs. Whether you're studying at Monash University, the University of Sydney, UNSW, or the University of Melbourne, we provide trusted MATLAB assistance to help you excel. Contact us today for the best MATLAB solutions online and achieve academic success!

MATLAB Assignment Help Services

Personalized Tutoring: Get one-on-one guidance from our MATLAB experts. Whether you're tackling basic concepts or advanced algorithms, we provide clear, step-by-step explanations to help you master MATLAB with confidence.

Assignment Assistance: Struggling with tight deadlines or complex assignments? Our team offers end-to-end support, from problem analysis to code development and debugging, ensuring your assignments meet the highest academic standards.

Project Development: Need expert help with your MATLAB research project? We assist in designing and implementing robust solutions, covering project planning, data collection, coding, simulation, and result analysis.

Coursework Support: Enhance your understanding of MATLAB with our comprehensive coursework assistance. We help you grasp lecture concepts, complete lab exercises, and prepare effectively for exams.

Thesis and Dissertation Guidance: Incorporate MATLAB seamlessly into your thesis or dissertation. Our experts provide support for data analysis, modeling, and simulation, ensuring your research is methodologically sound and impactful.

Contact us on WhatsApp for MATLAB help

Contact us on Telegram for MATLAB solutions