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 = thisSliceelse array3d = cat(3, array3d, thisSlice);endendimplay(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.
Best Answer