How do i save a .tif stack of grayscale or RGB images into a 4d-array like in the "mri example" of MATLAB?
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi, i want to save a stack of grayscale or RGB images, already converted to one .tif file, into a 4D-array, where the fourth value is the number of the slice, just like in the MATLAB example "mri", to do some analysis, e.g displaying 3-D Contour Slices.
I think in the example they used indexed images, so i already did this:
I = imread('D:\Images\Test\1.tif');
[D, map] = gray2ind(I,255);
imshow(D, map);
Can anybody please help? Thanks in advance.
댓글 수: 0
채택된 답변
Image Analyst
2016년 10월 16일
Use cat(4,)
rgb4D = cat(4, rgbImage1, rgbImage2);
댓글 수: 6
Anand P
2019년 6월 10일
How did you view your resultant volulme? Were you able to view the volume using the same colors as that of the individual images ?
Image Analyst
2019년 6월 11일
I did not visualize it. If you wanted to, you could extract one RGB slice image.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!