Is there a way to scale the colormap in volshow()? Similar to using 'caxis', [min max] for image()?
% Example volume imcube = bsxfun(@power, rand(30, 30, 100),... permute(linspace(0, 8, 100), [3, 1, 2])).*... permute(linspace(1, 0, 100), [3, 1, 2]); % Pick your color map cmp = jet; % Generate your volume object V = volshow(imcube,... 'Renderer', 'MaximumIntensityProjection',... 'Colormap', cmp,... 'BackgroundColor', [0, 0, 0]); % Set your new color axis. This does the same thing as caxis normally % would. % % % % % % % % % % % % CAXIS EQUIVALENT % % % % % % % % % % VAxis = [0.2, 1.5]; % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % Generate new scale newscale = linspace(min(imcube(:)) - min(VAxis(:)),... max(imcube(:)) - min(VAxis(:)), size(cmp, 1))/diff(VAxis); newscale(newscale < 0) = 0; newscale(newscale > 1) = 1; % Update colormap in volshow V.Colormap = interp1(linspace(0, 1, size(cmp, 1)), cmp, newscale);volshow(
displays 3-D grayscale volumeV
)V
in a figure. You can rotate and zoom in and out on the display interactively using the mouse.
for example
Load MRI data and remove the singleton dimension.
load mri V = squeeze(D);
Generate a colormap and transparency (alpha) map suited for MRI images.
intensity = [0 20 40 120 220 1024]; alpha = [0 0 0.15 0.3 0.38 0.5]; color = ([0 0 0; 43 0 0; 103 37 20; 199 155 97; 216 213 201; 255 255 255]) ./ 255; queryPoints = linspace(min(intensity),max(intensity),256); alphamap = interp1(intensity,alpha,queryPoints)'; colormap = interp1(intensity,color,queryPoints);
View the volume with the custom colormap and transparency map. Click and drag the mouse to rotate the volume. Use the scroll wheel to zoom in and out of the volume.
ASK NOW
Matlabsolutions.com provides guaranteed satisfaction with a
commitment to complete the work within time. Combined with our meticulous work ethics and extensive domain
experience, We are the ideal partner for all your homework/assignment needs. We pledge to provide 24*7 support
to dissolve all your academic doubts. We are composed of 300+ esteemed Matlab and other experts who have been
empanelled after extensive research and quality check.
Matlabsolutions.com provides undivided attention to each Matlab
assignment order with a methodical approach to solution. Our network span is not restricted to US, UK and Australia rather extends to countries like Singapore, Canada and UAE. Our Matlab assignment help services
include Image Processing Assignments, Electrical Engineering Assignments, Matlab homework help, Matlab Research Paper help, Matlab Simulink help. Get your work
done at the best price in industry.