function [newD] = displayIso(D,isovalue,rot1,rot2) D = squeeze(D); % Smooth the surface Ds = smooth3(D); % Choosing an isovalue (5), extracting the isosurface and displaying it hiso = patch(isosurface(Ds,isovalue),'FaceColor',[1,.75,.65],'EdgeColor','none'); % Customizing the view view(rot1,rot2); % Changing the aspect ratio to account for non-uniform image spatial resolution daspect([1,1,.4]) set(hiso,'SpecularColorReflectance',0,'SpecularExponent',50) lightangle(45,30);set(gcf,'Renderer','zbuffer'); lighting phong