Making a RGB 3D array from multiple 2D colored slices
显示 更早的评论
Hello, I have multiple CT Scan slices that I want to add together into a 3D array for processing. I have 2 options now, I can convert the slices to RGB beforehand using threshholding and combine them like this:
if slice == 1
array3d = thisSlice
else
array3d = cat(3, array3d, thisSlice);
end
end
implay(array3d);
save ('3D\3d_array.mat', 'array3d' );
Now, the problem with that is that i don't get an RGB array in implay, it takes every color as it's own slice, so when i add 7, i get 21 slices in implay.
The other option is that i combine them using the code above while still in greyscale, and then convert the stack ionto RGB.
But using this code on the stack:
thresh = multithresh(original,2);
seg_I = imquantize(original,thresh);
RGB = label2rgb(seg_I);
does not work, because label2rgb does only take 2D input. I tried label2rgb3D, but that only puts out a 4D double instead of a matrix that I can work with.
For example, i want to blur it using imfilter and i cant get the 4D-double to work with implay or volumeviewer.
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Red 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!