how to convert 4D into 3D?
23 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
mohd akmal masud
el 30 de Jul. de 2022
Editada: mohd akmal masud
el 31 de Jul. de 2022
Dear all,
I have 4D images. Can get thru this link. ( https://drive.google.com/file/d/1qlj_6MIcjdN5a2eZXitvtD5dfGhSdt8t/view?usp=sharing ). https://drive.google.com/file/d/1qlj_6MIcjdN5a2eZXitvtD5dfGhSdt8t/view?usp=sharing
the name file is LiverTS399.mat
how to convert it into 3D?
I tried use this command, but still 4D in workspace
load('LiverTS399.mat')
split = squeeze(cropVol);
0 comentarios
Respuesta aceptada
Walter Roberson
el 31 de Jul. de 2022
split = reshape(cropVol, size(cropVol,1), size(cropVol,2), size(cropVol,3)*size(cropVol,4));
This would give you a 3D volume in which the 4th dimension has been spread out onto the third dimension.
or perhaps you want
split = squeeze(num2cell(cropVol, [1 2 3]));
This would give you a cell array in which each element was a 3D slice.
1 comentario
mohd akmal masud
el 31 de Jul. de 2022
Editada: mohd akmal masud
el 31 de Jul. de 2022
Más respuestas (1)
Matt J
el 31 de Jul. de 2022
If you mean you want the i-th 3D frame of the 4D data, then,
frame_i=cropVol(:,:,i)
1 comentario
mohd akmal masud
el 31 de Jul. de 2022
Editada: mohd akmal masud
el 31 de Jul. de 2022
Ver también
Categorías
Más información sobre Convert Image Type en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!