Dear all,
I'm working with brain MRI images and as a result I obtain statistical maps (values between 0 and 25) which I would like to represent in 3D with a colormap. I have x, y and z coordinates, and stat(the statistical value which I want to represent in color). I used a nice function called PATCH_3Darray, calling patch for each voxel, and I obtained this image:
I would like to smooth the voxels, so they do not seem bricks and don't have corner-edges. How could I smooth all if there are individual patches?
I was considering binarizing my statistical image, get connected voxels, create an isosurface like: BW=statistical_image>0; CC = bwconncomp(BW); L = labelmatrix(CC); color=hsv(15);
for i=1:1:numel(unique(L)) A=(L==i); e = patch(isosurface(A,0.5), … 'FaceColor', color(i,:), 'EdgeColor', 'none'); hold on end
and somehow get in the surface/"face" of each object the real values in the matrix statistical_image (as in the first image), colored with a colormap. How could I do it? Please, could you help me with code?
Thank you very much, All the best,
Úrsula
Best Answer