{"id":423,"date":"2009-12-11T19:32:26","date_gmt":"2009-12-11T19:32:26","guid":{"rendered":"https:\/\/blogs.mathworks.com\/videos\/2009\/12\/11\/advanced-making-a-sweeping-slice-through-volume-of-data\/"},"modified":"2018-01-08T20:52:14","modified_gmt":"2018-01-09T01:52:14","slug":"advanced-making-a-sweeping-slice-through-volume-of-data","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/videos\/2009\/12\/11\/advanced-making-a-sweeping-slice-through-volume-of-data\/","title":{"rendered":"Advanced: Making a sweeping slice through volume of data."},"content":{"rendered":"A MATLAB user recently asked how we could make a visualization similar to this one.\r\n<p>\r\n<iframe loading=\"lazy\" width=\"500\" height=\"375\" src=\"https:\/\/www.youtube.com\/embed\/T2kisXqMbEQ?feature=oembed\" frameborder=\"0\" gesture=\"media\" allow=\"encrypted-media\" allowfullscreen><\/iframe>\r\n<p>\r\n\r\n<p>\r\nI was a little surprised that we were able to do the visualization, with interactivity in less that 15 lines of code.\r\n<p>\r\n<code><pre>\r\n%%\r\nd = flow; d = shiftdim(d,2);\r\nx = 25;\r\ny = 26;\r\nz = 21.59561;\r\nv =  3.22068;\r\n\r\nh = slice(d,x,y,z)\r\nd(:,:,z:end) = nan;\r\nisosurface(d,-v)\r\n\r\nset(h,'edgeColor','none')\r\naxis equal\r\nzlim([0 size(d,3)])\r\ncolormap spring\r\n<\/pre><\/code>\r\n<p>\r\n\r\n<div><div class=\"row\"><div class=\"col-xs-12 containing-block\"><div class=\"bc-outer-container add_margin_20\"><videoplayer><div class=\"video-js-container\"><video data-video-id=\"3877437059001\" data-video-category=\"blog\" data-autostart=\"false\" data-account=\"62009828001\" data-omniture-account=\"mathwgbl\" data-player=\"rJ9XCz2Sx\" data-embed=\"default\" id=\"mathworks-brightcove-player\" class=\"video-js\" controls><\/video><script src=\"\/\/players.brightcove.net\/62009828001\/rJ9XCz2Sx_default\/index.min.js\"><\/script><script>if (typeof(playerLoaded) === 'undefined') {var playerLoaded = false;}(function isVideojsDefined() {if (typeof(videojs) !== 'undefined') {videojs(\"mathworks-brightcove-player\").on('loadedmetadata', function() {playerLoaded = true;});} else {setTimeout(isVideojsDefined, 10);}})();<\/script><\/div><\/videoplayer><\/div><\/div><\/div>\r\n <\/div>\r\n<p>\r\nThis video makes use of cell mode to get the interactivity.  You can see how something like this could be done with a GUI to get the interactivity that you might want.\r\n\r\n<p>\r\n\r\nIf you like this kind of thing, <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/764-sliceomatic\">Slice-o-matic<\/a>, will be good for you.\r\n","protected":false},"excerpt":{"rendered":"<div class=\"thumbnail thumbnail_asset asset_overlay video\"><a href=\"https:\/\/blogs.mathworks.com\/videos\/2009\/12\/11\/advanced-making-a-sweeping-slice-through-volume-of-data\/?dir=autoplay\"><img decoding=\"async\" src=\"https:\/\/cf-images.us-east-1.prod.boltdns.net\/v1\/static\/62009828001\/b399b008-61ac-4f78-a0fd-fb4a1bca0988\/faeec078-6e87-484a-8688-74899ba1e1c3\/1280x720\/match\/image.jpg\" onError=\"this.style.display ='none';\"\/>\n      <div class=\"overlay_container\">\n      <span class=\"icon-video icon_color_null\"><time class=\"video_length\">3:44<\/time><\/span>\n      <\/div>\n      <\/a><\/div><p>A MATLAB user recently asked how we could make a visualization similar to this one.\r\n\r\n\r\n\r\n\r\n\r\nI was a little surprised that we were able to do the visualization, with interactivity in less that 15&#8230; <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/videos\/2009\/12\/11\/advanced-making-a-sweeping-slice-through-volume-of-data\/\">read more >><\/a><\/p>","protected":false},"author":68,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[4,12],"tags":[],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/videos\/wp-json\/wp\/v2\/posts\/423"}],"collection":[{"href":"https:\/\/blogs.mathworks.com\/videos\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.mathworks.com\/videos\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/videos\/wp-json\/wp\/v2\/users\/68"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/videos\/wp-json\/wp\/v2\/comments?post=423"}],"version-history":[{"count":1,"href":"https:\/\/blogs.mathworks.com\/videos\/wp-json\/wp\/v2\/posts\/423\/revisions"}],"predecessor-version":[{"id":3328,"href":"https:\/\/blogs.mathworks.com\/videos\/wp-json\/wp\/v2\/posts\/423\/revisions\/3328"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/videos\/wp-json\/wp\/v2\/media?parent=423"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/videos\/wp-json\/wp\/v2\/categories?post=423"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/videos\/wp-json\/wp\/v2\/tags?post=423"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}