how to concatenate variables for DWI images
5 次查看(过去 30 天)
显示 更早的评论
I have written matlab code to read 5 diffusin weighted images (DWI niftii files) having size 176x176x14 (rows x column x no. of slices) and want to concatenate all DWI variables (DWI1, DWI2, DWI3, DWI4, DWI5) as shown below.. after running this code C has 176x880x14. what could be wrong in concatenation. Please suggest the right way of doing it. Thank you in advance.
DWI1 = niftiread('1_b0.nii');
DWI2 = niftiread('2_b150.nii');
DWI3 = niftiread('3_b500.nii');
DWI4 = niftiread('4_b1000.nii');
DWI5 = niftiread('5_b2000.nii');
C = [DWI1, DWI2, DWI3, DWI4, DWI5];
0 个评论
采纳的回答
Sindhu Karri
2020-5-28
Hii, As you have concatenated 5 images (176x176x14) along 2nd dimension ,the resulted image has (176x880x14) ,where 880=176*5,which is reasonable.
Depending on the requirement you can use the following functions:
1)cat()
2)imfuse
3)montage
Refer to below links:
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Special Functions 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!