How do you plot a set of 2D images diagonally?

6 views (last 30 days)
ridethelightning
ridethelightning on 11 Jan 2022
Edited: Kevin Holly on 12 Jan 2022
Hello,
I am trying to plot a set of 2D images diagonally but am having some trouble in doing so & figuring out a proper/correct way of doing so.
I have an array of m x n x p where p is the number of images but they were taken at an angle with respect to the longitudinal axis of my coordinate system. The only way I've been able to achieve this is via rotate() but that doesn't require re-mapping of the values to the current coordinate system & is a bit random.
I'll use one image as an example of what I'm trying to do. I have a couple of plots as an example.The first one (normal) is the image plotted and the second (diagonal) with the image diagonally rotated using rotate(). The second way is the way I would like to do it, but without rotating the coordinate system. I think I may need to interpolate the data first, but I'm not sure how to go about it nor do I know the best way to plot it exactly (surf, plot3?). I am also hoping to be able to make contours & isosurfaces from multiple images so I hope that the diagonal representation is still valid with these.
Any guide would be really appreciated, thank you!
Here is the bit of code I used to generate these images:
% Slice stack in 3D
[X,Z,Y] = meshgrid(x,z,y);
xslice = [];
yslice = [y1];
zslice = [];
fig1 = slice(X,Z,Y,imgset,xslice,zslice,yslice);
rotate(fig1, [0,0,1], angle)

Answers (1)

Kevin Holly
Kevin Holly on 11 Jan 2022
Is this what you are looking for?
x = 1:14;%rand(1,14);
z = 1:14;%rand(1,14);
y = 1:14;%rand(1,14);
y1 = 7;
imgset = rand(14,14,14);
[X,Z,Y] = meshgrid(x,z,y);
xslice = [];
yslice = [y1];
zslice = [];
fig1 = slice(X,Z,Y,imgset,xslice,zslice,yslice);
rotate(fig1, [0,0,1], 30)
new = imrotate3(imgset,30,[0,0,1])
new =
new(:,:,1) = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.7819 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.7074 0.3836 0.4623 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.8306 0.5785 0.5624 0.7504 0.5292 0.8615 0 0 0 0 0 0 0 0 0 0 0 0 0 0.4856 0.7423 0.4175 0.6621 0.6704 0.7084 0.7910 0 0 0 0 0 0 0 0 0 0 0 0.5581 0.6609 0.5583 0.7779 0.6843 0.7607 0.3698 0.4720 0.5865 0.6621 0 0 0 0 0 0 0 0 0.7055 0.6221 0.5885 0.7744 0.4791 0.5577 0.6405 0.9022 0.5865 0.2222 0.1956 0.1929 0 0 0 0 0 0 0.8255 0.4448 0.3081 0.5162 0.5398 0.7387 0.7192 0.3518 0.3658 0.4856 0.4511 0.3337 0.4451 0.5437 0.8060 0 0 0 0 0 0 0.3408 0.5965 0.5405 0.7077 0.5284 0.5783 0.4912 0.2624 0.3360 0.3873 0.4829 0.5137 0.8723 0.8409 0.1368 0 0 0 0 0 0.3258 0.6898 0.2646 0.7060 0.6505 0.3949 0.4881 0.4836 0.6932 0.8673 0.6976 0.2303 0.5231 0.4892 0.1915 0 0 0 0 0 0 0.5429 0.4917 0.7075 0.6584 0.7899 0.7984 0.3671 0.3468 0.5387 0.4494 0.2076 0.3386 0.8542 0.4884 0.6198 0 0 0 0 0 0.3284 0.5347 0.4394 0.4398 0.5422 0.4953 0.5146 0.3066 0.5062 0.9206 0.5499 0.7621 0.5740 0.5319 0.5143 0 0 0 0 0 0 0.7029 0.4824 0.8194 0.5533 0.8751 0.5352 0.4307 0.4358 0.6619 0.7241 0.8118 0.4628 0.4441 0.3396 0.7233 0 0 0 0 0 0 0.2842 0.5526 0.5041 0.3361 0.4573 0.6282 0.3885 0.7697 0.7797 0.8051 0.7754 0.4284 0 0 0 0 0 0 0 0 0.5577 0.3011 0.4642 0.2166 0.6540 0.5795 0.5944 0.6339 0.4716 0.5812 0 0 0 0 0 0 0 0 0 0 0 0.3370 0.4219 0.3887 0.1675 0.2603 0.0516 0.5177 0 0 0 0 0 0 0 0 0 0 0 0 0 0.3024 0.6025 0.6833 0.7692 0.4434 0.7548 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5605 0.4915 0.3788 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2350 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 new(:,:,2) = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5417 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.6842 0.3184 0.4490 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0816 0.5197 0.1900 0.0690 0.2294 0.3289 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5235 0.3407 0.6080 0.5738 0.2728 0.1629 0.4533 0 0 0 0 0 0 0 0 0 0 0 0.7159 0.3569 0.6554 0.6105 0.3852 0.7357 0.4329 0.5563 0.6456 0.2717 0 0 0 0 0 0 0 0 0.6778 0.6547 0.5193 0.7277 0.8028 0.7928 0.2311 0.4651 0.5718 0.5856 0.2826 0.5017 0 0 0 0 0 0 0.6057 0.4588 0.8960 0.6848 0.6246 0.5431 0.4734 0.5161 0.1834 0.4838 0.8566 0.8604 0.2487 0.3841 0.3620 0 0 0 0 0 0 0.2909 0.4591 0.5379 0.4395 0.7647 0.1387 0.3048 0.5678 0.5089 0.4253 0.7306 0.5412 0.4294 0.2648 0.4060 0 0 0 0 0 0.3004 0.4717 0.5861 0.7534 0.8292 0.3992 0.1776 0.3167 0.8238 0.2522 0.7607 0.7592 0.4788 0.5311 0.5733 0 0 0 0 0 0 0.3285 0.4100 0.7562 0.7337 0.3168 0.1435 0.1121 0.6623 0.5243 0.5373 0.6641 0.8232 0.5884 0.3912 0.5713 0 0 0 0 0 0.1830 0.4153 0.6249 0.5509 0.4120 0.2935 0.1906 0.2358 0.6291 0.5798 0.7127 0.6771 0.5866 0.6884 0.5500 0 0 0 0 0 0 0.2998 0.3003 0.4402 0.4023 0.5552 0.5083 0.8059 0.6411 0.4112 0.8119 0.8922 0.4478 0.7623 0.3516 0.1190 0 0 0 0 0 0 0.4030 0.6872 0.5099 0.7412 0.7521 0.6413 0.9263 0.2030 0.4569 0.7682 0.7334 0.5569 0 0 0 0 0 0 0 0 0.7667 0.6612 0.7077 0.7425 0.6028 0.5844 0.7360 0.6474 0.6026 0.7214 0 0 0 0 0 0 0 0 0 0 0 0.6176 0.7504 0.3357 0.2226 0.4288 0.3836 0.6014 0 0 0 0 0 0 0 0 0 0 0 0 0 0.4759 0.3258 0.3725 0.6165 0.3305 0.2246 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.3624 0.5515 0.6278 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.7321 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 new(:,:,3) = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.6121 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.4286 0.2357 0.2417 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5807 0.3912 0.4775 0.2938 0.5449 0.5966 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5475 0.0435 0.4825 0.2613 0.3103 0.7498 0.7803 0 0 0 0 0 0 0 0 0 0 0 0.5021 0.5434 0.4482 0.2663 0.2095 0.3455 0.3843 0.8298 0.6934 0.3211 0 0 0 0 0 0 0 0 0.3194 0.2249 0.5538 0.3617 0.1974 0.7719 0.2596 0.6530 0.5309 0.4470 0.5917 0.2068 0 0 0 0 0 0 0.1547 0.4238 0.2236 0.2611 0.6087 0.5326 0.6510 0.6810 0.5005 0.4243 0.2207 0.5556 0.5607 0.2204 0.3587 0 0 0 0 0 0 0.3923 0.6102 0.6687 0.6174 0.5946 0.7293 0.6068 0.8048 0.3371 0.4382 0.8245 0.8210 0.3907 0.3120 0.3964 0 0 0 0 0 0.2699 0.2198 0.6965 0.6116 0.2962 0.3611 0.5174 0.6318 0.4290 0.5203 0.8405 0.8762 0.5226 0.7308 0.6450 0 0 0 0 0 0 0.3605 0.2449 0.5414 0.3298 0.4033 0.8164 0.7129 0.7189 0.8708 0.9087 0.5952 0.5122 0.3538 0.6965 0.6537 0 0 0 0 0 0.2934 0.1250 0.6801 0.3219 0.4448 0.6215 0.7375 0.7783 0.5527 0.6998 0.3631 0.6150 0.5019 0.3660 0.6774 0 0 0 0 0 0 0.7456 0.7346 0.7308 0.6340 0.1580 0.4260 0.5449 0.3687 0.5502 0.6042 0.6860 0.7285 0.8433 0.6361 0.6137 0 0 0 0 0 0 0.6068 0.3650 0.3714 0.3305 0.2881 0.1669 0.4572 0.2008 0.2880 0.4847 0.6878 0.7142 0 0 0 0 0 0 0 0 0.5753 0.6665 0.4087 0.7035 0.7963 0.5214 0.6416 0.3062 0.3995 0.4257 0 0 0 0 0 0 0 0 0 0 0 0.4925 0.0666 0.4789 0.3893 0.3063 0.3223 0.3714 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5212 0.2175 0.5502 0.7456 0.5635 0.4578 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2625 0.5327 0.7336 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5010 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 new(:,:,4) = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5546 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.4747 0.2425 0.2540 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.8551 0.8069 0.6538 0.6356 0.6174 0.2846 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2601 0.3643 0.7816 0.5547 0.5282 0.6329 0.3133 0 0 0 0 0 0 0 0 0 0 0 0.6678 0.4594 0.3459 0.3942 0.4823 0.2294 0.1265 0.4459 0.2972 0.2513 0 0 0 0 0 0 0 0 0.3580 0.5547 0.7472 0.2691 0.1859 0.3254 0.3948 0.5037 0.3237 0.3958 0.7354 0.3633 0 0 0 0 0 0 0.8121 0.6808 0.1857 0.4972 0.6950 0.2819 0.5598 0.4105 0.4738 0.4989 0.4237 0.3050 0.7071 0.2711 0.5780 0 0 0 0 0 0 0.5899 0.5510 0.6295 0.6458 0.3827 0.7410 0.2067 0.2486 0.2390 0.0522 0.1806 0.3126 0.2991 0.9396 0.5889 0 0 0 0 0 0.2271 0.2997 0.4523 0.3088 0.3748 0.5952 0.5107 0.5848 0.4829 0.7307 0.2364 0.5233 0.5104 0.7474 0.6820 0 0 0 0 0 0 0.4286 0.4883 0.4959 0.3411 0.1250 0.1581 0.6563 0.6027 0.4913 0.3532 0.7747 0.7802 0.4334 0.8221 0.7163 0 0 0 0 0 0.4606 0.6321 0.5834 0.6938 0.3234 0.1102 0.4174 0.8272 0.4001 0.6631 0.6553 0.5521 0.5287 0.7753 0.5330 0 0 0 0 0 0 0.6303 0.6982 0.5193 0.4895 0.0748 0.3823 0.3315 0.3822 0.7576 0.6488 0.6464 0.4091 0.8041 0.4897 0.3573 0 0 0 0 0 0 0.6243 0.5313 0.6019 0.4994 0.5339 0.2931 0.7236 0.8940 0.4763 0.5208 0.6775 0.6818 0 0 0 0 0 0 0 0 0.2766 0.8357 0.9036 0.5395 0.3340 0.2814 0.4968 0.6037 0.3515 0.6445 0 0 0 0 0 0 0 0 0 0 0 0.6128 0.5912 0.6063 0.4484 0.7431 0.8725 0.7200 0 0 0 0 0 0 0 0 0 0 0 0 0 0.7800 0.3800 0.7043 0.7496 0.5923 0.3450 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.4588 0.5670 0.5316 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5878 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 new(:,:,5) = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.3843 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.3032 0.4168 0.6302 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.3639 0.3810 0.3563 0.4110 0.2538 0.7176 0 0 0 0 0 0 0 0 0 0 0 0 0 0.4825 0.9485 0.2342 0.1122 0.3349 0.4762 0.3567 0 0 0 0 0 0 0 0 0 0 0 0.4298 0.6944 0.6173 0.7360 0.3550 0.2147 0.3424 0.6169 0.2117 0.1300 0 0 0 0 0 0 0 0 0.3718 0.5721 0.8902 0.4548 0.5235 0.4980 0.3225 0.3875 0.5295 0.4372 0.1989 0.5471 0 0 0 0 0 0 0.6285 0.7252 0.8473 0.3371 0.7177 0.3870 0.4273 0.1727 0.2082 0.5787 0.2374 0.6776 0.3964 0.5904 0.3006 0 0 0 0 0 0 0.8447 0.6691 0.4446 0.4394 0.2298 0.8691 0.3255 0.5326 0.7085 0.6506 0.5817 0.8755 0.7646 0.1680 0.8169 0 0 0 0 0 0.6806 0.5871 0.1807 0.5719 0.2801 0.6694 0.6231 0.3485 0.5219 0.7179 0.4575 0.8672 0.7201 0.4288 0.6223 0 0 0 0 0 0 0.7537 0.5613 0.4299 0.2197 0.1974 0.4377 0.3081 0.3119 0.6633 0.6949 0.4298 0.5870 0.5747 0.6774 0.7091 0 0 0 0 0 0.6522 0.0571 0.5655 0.7379 0.4561 0.4696 0.4325 0.4122 0.7864 0.1895 0.0726 0.4352 0.5914 0.4551 0.2264 0 0 0 0 0 0 0.6225 0.5247 0.3858 0.7424 0.2328 0.3338 0.3289 0.5669 0.3611 0.3108 0.7521 0.4953 0.5900 0.4010 0.7021 0 0 0 0 0 0 0.6407 0.1861 0.6375 0.5753 0.3837 0.3344 0.5781 0.2680 0.1384 0.5329 0.7305 0.7251 0 0 0 0 0 0 0 0 0.1440 0.5869 0.7717 0.4423 0.5033 0.4552 0.4009 0.3008 0.1191 0.1957 0 0 0 0 0 0 0 0 0 0 0 0.5545 0.4297 0.4788 0.3129 0.6676 0.8387 0.3785 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5607 0.6340 0.7077 0.2752 0.2873 0.4912 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.3420 0.3800 0.4165 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2193 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 new(:,:,6) = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.8888 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.6311 0.4848 0.5569 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.3297 0.3580 0.4715 0.3233 0.7250 0.3659 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2714 0.0653 0.1559 0.1133 0.2491 0.4318 0.4622 0 0 0 0 0 0 0 0 0 0 0 0.5305 0.3594 0.4464 0.4066 0.5402 0.7229 0.7150 0.4476 0.2338 0.4254 0 0 0 0 0 0 0 0 0.4259 0.5909 0.2703 0.6486 0.4795 0.5336 0.6773 0.4059 0.3338 0.3449 0.4575 0.1891 0 0 0 0 0 0 0.5606 0.3487 0.3677 0.7618 0.6215 0.5344 0.3587 0.4698 0.7016 0.3973 0.6316 0.2545 0.7054 0.5052 0.4301 0 0 0 0 0 0 0.6135 0.7151 0.5259 0.4365 0.3432 0.1680 0.5020 0.7554 0.4596 0.6153 0.5261 0.2436 0.3945 0.0617 0.6229 0 0 0 0 0 0.6686 0.8193 0.4592 0.4032 0.2858 0.3209 0.6494 0.8249 0.6441 0.2431 0.7699 0.3168 0.2079 0.4179 0.4859 0 0 0 0 0 0 0.4710 0.5809 0.6666 0.6013 0.2485 0.3534 0.6521 0.6168 0.6866 0.9262 0.7729 0.7918 0.4179 0.3200 0.7488 0 0 0 0 0 0.2488 0.0591 0.4668 0.7417 0.4443 0.6661 0.6429 0.6095 0.5637 0.8903 0.7906 0.6437 0.6006 0.7520 0.4923 0 0 0 0 0 0 0.5762 0.4314 0.7667 0.5497 0.9359 0.4801 0.3935 0.4316 0.4373 0.3193 0.3060 0.4928 0.8032 0.1855 0.1885 0 0 0 0 0 0 0.3698 0.4266 0.5496 0.3458 0.3317 0.6924 0.6460 0.7381 0.2760 0.1752 0.3186 0.5110 0 0 0 0 0 0 0 0 0.8906 0.4841 0.6838 0.6206 0.5572 0.6987 0.8243 0.8747 0.6764 0.2294 0 0 0 0 0 0 0 0 0 0 0 0.5452 0.8343 0.7633 0.3647 0.5125 0.1911 0.5847 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5783 0.7789 0.7287 0.6238 0.4940 0.2656 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.4949 0.3208 0.4200 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5654 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 new(:,:,7) = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.3172 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.4934 0.3924 0.6314 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2702 0.5806 0.5722 0.5276 0.8280 0.4929 0 0 0 0 0 0 0 0 0 0 0 0 0 0.4091 0.2958 0.4368 0.4351 0.4991 0.3076 0.2959 0 0 0 0 0 0 0 0 0 0 0 0.2606 0.6300 0.5412 0.4734 0.5994 0.4141 0.4952 0.2379 0.3672 0.2406 0 0 0 0 0 0 0 0 0.5117 0.4331 0.3696 0.4923 0.2561 0.6992 0.8596 0.3865 0.2886 0.6113 0.6346 0.2358 0 0 0 0 0 0 0.7451 0.6619 0.4813 0.6332 0.5935 0.5094 0.5899 0.7407 0.8352 0.7816 0.1018 0.3641 0.2328 0.3061 0.6528 0 0 0 0 0 0 0.5595 0.2526 0.7284 0.7325 0.6036 0.9480 0.6291 0.7985 0.7330 0.6985 0.6024 0.2464 0.4590 0.1538 0.5762 0 0 0 0 0 0.6237 0.4684 0.8267 0.6005 0.6192 0.2368 0.3874 0.5214 0.2387 0.3992 0.7669 0.5466 0.5949 0.2452 0.5090 0 0 0 0 0 0 0.2745 0.3935 0.6178 0.4541 0.6929 0.5955 0.4162 0.1796 0.2057 0.4447 0.5776 0.6592 0.2843 0.7721 0.3754 0 0 0 0 0 0.4335 0.6899 0.6548 0.5782 0.6488 0.2887 0.1755 0.2923 0.0665 0.5487 0.5846 0.5341 0.5490 0.4752 0.4813 0 0 0 0 0 0 0.2125 0.3636 0.3830 0.3587 0.2417 0.2920 0.3860 0.3056 0.4088 0.5676 0.3443 0.6045 0.6324 0.7298 0.7167 0 0 0 0 0 0 0.2715 0.1387 0.2327 0.6346 0.4934 0.5646 0.8378 0.3594 0.3471 0.6067 0.5776 0.5768 0 0 0 0 0 0 0 0 0.6083 0.3628 0.3123 0.5381 0.2105 0.7038 0.7997 0.3747 0.4271 0.3309 0 0 0 0 0 0 0 0 0 0 0 0.3083 0.4080 0.4097 0.3035 0.6705 0.8050 0.5199 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2330 0.0830 0.4763 0.3580 0.5937 0.7224 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5005 0.5148 0.4907 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.4137 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 new(:,:,8) = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.4171 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5380 0.2536 0.4255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2611 0.3331 0.3021 0.5486 0.8781 0.5435 0 0 0 0 0 0 0 0 0 0 0 0 0 0.3852 0.0476 0.0760 0.0298 0.4818 0.5521 0.5915 0 0 0 0 0 0 0 0 0 0 0 0.8086 0.6543 0.4186 0.3716 0.5256 0.3192 0.4250 0.6065 0.7352 0.4970 0 0 0 0 0 0 0 0 0.3588 0.2512 0.6142 0.6299 0.6290 0.2088 0.5955 0.4657 0.5558 0.2585 0.4361 0.5055 0 0 0 0 0 0 0.6728 0.3738 0.4300 0.3336 0.7231 0.3677 0.2815 0.3038 0.2884 0.6274 0.7236 0.4336 0.8158 0.2842 0.3379 0 0 0 0 0 0 0.6326 0.3729 0.2976 0.2057 0.3895 0.0789 0.6033 0.2138 0.5932 0.6962 0.4803 0.1080 0.2200 0.4784 0.4459 0 0 0 0 0 0.5777 0.6777 0.5178 0.6464 0.7713 0.7364 0.8133 0.6448 0.7343 0.6419 0.2492 0.5115 0.4549 0.4060 0.4124 0 0 0 0 0 0 0.4724 0.5922 0.3550 0.4724 0.7653 0.9416 0.5973 0.5963 0.6213 0.4864 0.6834 0.4409 0.7138 0.1784 0.3271 0 0 0 0 0 0.4485 0.8432 0.4470 0.5178 0.4616 0.7315 0.7232 0.6036 0.6174 0.6122 0.7834 0.6151 0.7034 0.6405 0.2706 0 0 0 0 0 0 0.3125 0.4618 0.4802 0.2304 0.5644 0.6629 0.5518 0.3097 0.4185 0.6463 0.1851 0.5721 0.3212 0.1955 0.1772 0 0 0 0 0 0 0.2749 0.7455 0.5318 0.1975 0.2675 0.2597 0.2809 0.6768 0.4530 0.4449 0.7099 0.6881 0 0 0 0 0 0 0 0 0.3479 0.2224 0.2536 0.5944 0.5237 0.2273 0.2521 0.7359 0.5342 0.4716 0 0 0 0 0 0 0 0 0 0 0 0.2152 0.5760 0.5808 0.8133 0.6027 0.8440 0.6789 0 0 0 0 0 0 0 0 0 0 0 0 0 0.3885 0.2480 0.3677 0.4383 0.4512 0.6080 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.3167 0.5799 0.6435 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.3556 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 new(:,:,9) = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.8687 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.4284 0.6722 0.6346 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5673 0.6161 0.8655 0.8842 0.3653 0.3009 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1830 0.4093 0.6087 0.7670 0.6247 0.2787 0.1403 0 0 0 0 0 0 0 0 0 0 0 0.4221 0.3193 0.3338 0.5249 0.6437 0.2225 0.4957 0.7607 0.2107 0.3825 0 0 0 0 0 0 0 0 0.5170 0.5519 0.2409 0.4308 0.6714 0.4984 0.5259 0.5602 0.7170 0.3534 0.2187 0.2764 0 0 0 0 0 0 0.4215 0.3770 0.5094 0.8396 0.4414 0.6331 0.6474 0.5898 0.4781 0.4277 0.3587 0.3755 0.5660 0.3561 0.3480 0 0 0 0 0 0 0.3496 0.3670 0.6177 0.3856 0.5347 0.4834 0.6926 0.5062 0.3451 0.6732 0.6710 0.8822 0.7377 0.5919 0.6388 0 0 0 0 0 0.3231 0.1861 0.7856 0.3958 0.6103 0.5740 0.5124 0.5439 0.3973 0.4305 0.2585 0.5442 0.6409 0.5347 0.6711 0 0 0 0 0 0 0.1199 0.4972 0.6796 0.7273 0.2373 0.2106 0.7503 0.8462 0.8376 0.6045 0.5110 0.6165 0.4504 0.6840 0.3997 0 0 0 0 0 0.3996 0.7373 0.3187 0.2621 0.4643 0.8068 0.5942 0.5390 0.7649 0.6104 0.3346 0.5447 0.4093 0.4802 0.7074 0 0 0 0 0 0 0.5898 0.3053 0.6461 0.4084 0.8811 0.6102 0.2867 0.5096 0.4029 0.1321 0.4163 0.5396 0.5721 0.6731 0.4026 0 0 0 0 0 0 0.4350 0.2543 0.2606 0.6448 0.7950 0.7123 0.6702 0.2165 0.1664 0.7174 0.8550 0.6915 0 0 0 0 0 0 0 0 0.5391 0.3819 0.5488 0.5806 0.6557 0.5374 0.4035 0.3289 0.2411 0.6290 0 0 0 0 0 0 0 0 0 0 0 0.5019 0.3533 0.4377 0.3674 0.2587 0.1641 0.4175 0 0 0 0 0 0 0 0 0 0 0 0 0 0.4179 0.7335 0.5311 0.4950 0.5043 0.5166 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.4800 0.5057 0.4992 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5220 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 new(:,:,10) = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5326 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.6628 0.5540 0.5169 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.3064 0.2831 0.4696 0.7730 0.5438 0.4134 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5061 0.2391 0.4115 0.7187 0.6846 0.5806 0.4227 0 0 0 0 0 0 0 0 0 0 0 0.3848 0.7488 0.3711 0.1725 0.5276 0.1908 0.3539 0.7197 0.5858 0.5427 0 0 0 0 0 0 0 0 0.3630 0.4173 0.6886 0.3799 0.0964 0.6315 0.8033 0.2280 0.4381 0.5321 0.5853 0.6512 0 0 0 0 0 0 0.5354 0.2182 0.4162 0.3748 0.5175 0.6749 0.5691 0.7373 0.7882 0.3969 0.8487 0.5256 0.7652 0.5160 0.4530 0 0 0 0 0 0 0.3431 0.3180 0.6374 0.8311 0.4609 0.4120 0.4830 0.1012 0.4133 0.8396 0.5987 0.8243 0.7243 0.3804 0.5629 0 0 0 0 0 0.5814 0.1813 0.5124 0.7526 0.5106 0.8056 0.4237 0.1562 0.5140 0.2686 0.1710 0.6719 0.7428 0.5233 0.6008 0 0 0 0 0 0 0.1942 0.2299 0.4435 0.7477 0.4840 0.2430 0.6062 0.8463 0.5532 0.2983 0.3951 0.8290 0.6539 0.6067 0.3064 0 0 0 0 0 0.2315 0.9071 0.2709 0.3139 0.3696 0.4380 0.7103 0.5495 0.5731 0.1295 0.5778 0.8632 0.5282 0.1613 0.3831 0 0 0 0 0 0 0.1896 0.3840 0.8422 0.5056 0.3519 0.5672 0.1921 0.4104 0.6969 0.6012 0.8163 0.4383 0.3831 0.4629 0.4484 0 0 0 0 0 0 0.5109 0.8299 0.5976 0.4841 0.4432 0.3386 0.2207 0.2976 0.4369 0.6623 0.6268 0.4362 0 0 0 0 0 0 0 0 0.5911 0.4241 0.7496 0.5659 0.8219 0.6347 0.5156 0.5030 0.4967 0.8009 0 0 0 0 0 0 0 0 0 0 0 0.1984 0.3517 0.5048 0.3168 0.7115 0.3865 0.5115 0 0 0 0 0 0 0 0 0 0 0 0 0 0.7176 0.8658 0.5760 0.1178 0.6237 0.7948 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.4870 0.1546 0.3282 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.7544 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 new(:,:,11) = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.4247 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.7210 0.5934 0.4928 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5666 0.4166 0.4573 0.6724 0.7454 0.5835 0 0 0 0 0 0 0 0 0 0 0 0 0 0.4722 0.9638 0.2396 0.5226 0.6592 0.3560 0.7619 0 0 0 0 0 0 0 0 0 0 0 0.1707 0.3689 0.4995 0.7650 0.5351 0.2385 0.5716 0.1619 0.5457 0.5836 0 0 0 0 0 0 0 0 0.3792 0.5542 0.6384 0.2485 0.2765 0.6411 0.7648 0.5562 0.4472 0.4789 0.2598 0.3157 0 0 0 0 0 0 0.3882 0.6739 0.5736 0.1307 0.6154 0.6297 0.6615 0.4889 0.5470 0.6565 0.7722 0.5115 0.3338 0.6616 0.8847 0 0 0 0 0 0 0.6286 0.5511 0.4385 0.4235 0.4803 0.9399 0.6326 0.6185 0.4087 0.2672 0.5865 0.8588 0.8781 0.3425 0.5492 0 0 0 0 0 0.5454 0.8220 0.6157 0.2918 0.1597 0.5177 0.5677 0.6168 0.6729 0.7087 0.7266 0.8371 0.8125 0.4648 0.4302 0 0 0 0 0 0 0.4496 0.4553 0.3939 0.2930 0.1882 0.1475 0.5110 0.5283 0.6631 0.7264 0.6056 0.5319 0.8366 0.3170 0.1762 0 0 0 0 0 0.3600 0.6532 0.6799 0.6518 0.5285 0.4951 0.3388 0.5978 0.3348 0.6458 0.4092 0.4387 0.6803 0.4911 0.6108 0 0 0 0 0 0 0.7032 0.6256 0.8245 0.4701 0.4109 0.2649 0.1461 0.2944 0.7359 0.6321 0.3699 0.7539 0.3848 0.5918 0.1023 0 0 0 0 0 0 0.2753 0.1939 0.1576 0.4007 0.4419 0.1581 0.3504 0.5920 0.6225 0.4104 0.6218 0.4927 0 0 0 0 0 0 0 0 0.4265 0.2057 0.2923 0.6107 0.3339 0.1916 0.6083 0.7940 0.3927 0.3355 0 0 0 0 0 0 0 0 0 0 0 0.3137 0.3790 0.6425 0.6555 0.2248 0.2625 0.9179 0 0 0 0 0 0 0 0 0 0 0 0 0 0.6376 0.7012 0.2989 0.3973 0.2534 0.1096 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.4661 0.2449 0.4732 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5479 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 new(:,:,12) = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2373 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.3701 0.3967 0.1626 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.3426 0.5904 0.9111 0.7884 0.3528 0.2382 0 0 0 0 0 0 0 0 0 0 0 0 0 0.3470 0.1734 0.7158 0.9020 0.7058 0.6828 0.6166 0 0 0 0 0 0 0 0 0 0 0 0.3174 0.5330 0.4284 0.6698 0.8015 0.3460 0.4163 0.8344 0.7052 0.7772 0 0 0 0 0 0 0 0 0.3080 0.2736 0.3288 0.5066 0.5533 0.5894 0.6064 0.4331 0.5169 0.6778 0.5928 0.5467 0 0 0 0 0 0 0.8692 0.6547 0.5369 0.3593 0.4653 0.3802 0.5921 0.6762 0.3806 0.5373 0.6131 0.7889 0.4323 0.5671 0.8423 0 0 0 0 0 0 0.4619 0.6265 0.6759 0.7552 0.4037 0.4214 0.4599 0.0924 0.4710 0.6723 0.7756 0.6918 0.5738 0.3481 0.4656 0 0 0 0 0 0.4158 0.1732 0.5421 0.6845 0.4499 0.6275 0.4443 0.5895 0.3931 0.3068 0.5571 0.6391 0.5993 0.1865 0.1964 0 0 0 0 0 0 0.3836 0.2168 0.3317 0.7266 0.5898 0.5921 0.7635 0.6027 0.5097 0.6055 0.5561 0.1847 0.1789 0.1142 0.5695 0 0 0 0 0 0.4251 0.4783 0.4162 0.4289 0.5016 0.9314 0.6324 0.5027 0.5788 0.4435 0.4962 0.3427 0.5482 0.6728 0.5567 0 0 0 0 0 0 0.5683 0.7766 0.5160 0.2920 0.7758 0.4088 0.4060 0.5758 0.8047 0.4356 0.3092 0.5767 0.8023 0.5701 0.2994 0 0 0 0 0 0 0.8107 0.7724 0.6728 0.6354 0.2902 0.4864 0.1431 0.2147 0.3607 0.4105 0.3160 0.7927 0 0 0 0 0 0 0 0 0.5963 0.3451 0.2931 0.4508 0.3334 0.6008 0.3206 0.1674 0.5281 0.3827 0 0 0 0 0 0 0 0 0 0 0 0.4258 0.6692 0.5818 0.4055 0.6432 0.0740 0.4477 0 0 0 0 0 0 0 0 0 0 0 0 0 0.4095 0.6285 0.6209 0.4136 0.6514 0.4317 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5949 0.4386 0.5834 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5404 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 new(:,:,13) = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.3791 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.4251 0.3014 0.3662 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5204 0.3723 0.2374 0.1779 0.9159 0.3773 0 0 0 0 0 0 0 0 0 0 0 0 0 0.3072 0.1499 0.5035 0.5043 0.3272 0.7672 0.8400 0 0 0 0 0 0 0 0 0 0 0 0.3749 0.7737 0.5513 0.3857 0.6833 0.6975 0.3089 0.1199 0.6519 0.4781 0 0 0 0 0 0 0 0 0.5537 0.7119 0.6936 0.7641 0.4678 0.5961 0.6493 0.7496 0.4653 0.1346 0.3916 0.4424 0 0 0 0 0 0 0.3832 0.4258 0.6992 0.8081 0.4530 0.6393 0.5722 0.6378 0.7107 0.7344 0.1761 0.1777 0.5839 0.3306 0.3797 0 0 0 0 0 0 0.5979 0.8659 0.7949 0.6073 0.6440 0.5348 0.5686 0.5612 0.6383 0.3891 0.4119 0.2494 0.3824 0.8942 0.7888 0 0 0 0 0 0.6241 0.8904 0.6894 0.3348 0.7947 0.4823 0.3092 0.7466 0.6588 0.5339 0.7022 0.6090 0.3813 0.3946 0.4804 0 0 0 0 0 0 0.6263 0.6166 0.6612 0.8786 0.7977 0.1943 0.6778 0.5011 0.7164 0.8145 0.3762 0.2628 0.3587 0.1587 0.5426 0 0 0 0 0 0.3930 0.1012 0.5443 0.7673 0.6231 0.5025 0.6048 0.1622 0.4997 0.8785 0.6401 0.7163 0.6056 0.3527 0.5158 0 0 0 0 0 0 0.4013 0.4630 0.2763 0.5091 0.2811 0.5609 0.7380 0.4786 0.5478 0.5135 0.7470 0.5857 0.3059 0.7142 0.4020 0 0 0 0 0 0 0.2128 0.2198 0.3108 0.1706 0.3963 0.4356 0.1141 0.4653 0.2250 0.5659 0.4782 0.2017 0 0 0 0 0 0 0 0 0.5446 0.2893 0.5982 0.5340 0.8361 0.4725 0.2993 0.4861 0.2932 0.1767 0 0 0 0 0 0 0 0 0 0 0 0.5208 0.7034 0.6789 0.4487 0.3716 0.5395 0.4879 0 0 0 0 0 0 0 0 0 0 0 0 0 0.6408 0.7322 0.6197 0.7411 0.5615 0.6883 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.3787 0.2898 0.2546 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2890 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 new(:,:,14) = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5838 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.3881 0.5526 0.6871 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.4978 0.4075 0.7081 0.1272 0.6155 0.4317 0 0 0 0 0 0 0 0 0 0 0 0 0 0.7079 0.6527 0.5297 0.5803 0.3867 0.5627 0.2866 0 0 0 0 0 0 0 0 0 0 0 0.6827 0.3539 0.5710 0.6051 0.5079 0.5734 0.4224 0.4667 0.3519 0.5065 0 0 0 0 0 0 0 0 0.5450 0.5674 0.5457 0.5278 0.3659 0.7922 0.4744 0.4156 0.3587 0.4709 0.4076 0.6555 0 0 0 0 0 0 0.5340 0.8777 0.6292 0.5054 0.1577 0.4971 0.3361 0.5207 0.9777 0.7701 0.1407 0.3616 0.3727 0.4571 0.4063 0 0 0 0 0 0 0.7385 0.3714 0.4503 0.2929 0.5625 0.3872 0.3624 0.8921 0.6571 0.4042 0.3836 0.2091 0.2834 0.8330 0.4436 0 0 0 0 0 0.3546 0.2481 0.8454 0.7566 0.6157 0.3372 0.3810 0.3345 0.2105 0.5375 0.7012 0.3337 0.3534 0.5768 0.4605 0 0 0 0 0 0 0.5535 0.7026 0.6253 0.3039 0.2069 0.5947 0.6108 0.3229 0.6128 0.7303 0.4438 0.4022 0.3741 0.5862 0.3356 0 0 0 0 0 0.8559 0.2335 0.7406 0.5595 0.5001 0.8861 0.4793 0.2268 0.7509 0.3982 0.4052 0.7892 0.5361 0.6759 0.2771 0 0 0 0 0 0 0.5631 0.6963 0.6277 0.6435 0.7129 0.5693 0.3227 0.4936 0.5383 0.4642 0.5975 0.3495 0.8723 0.4123 0.2342 0 0 0 0 0 0 0.5225 0.2972 0.5246 0.6157 0.8703 0.7956 0.4527 0.4183 0.6143 0.5871 0.6841 0.8215 0 0 0 0 0 0 0 0 0.4685 0.6580 0.7549 0.5582 0.7140 0.8184 0.7789 0.5044 0.4829 0.8487 0 0 0 0 0 0 0 0 0 0 0 0.6539 0.7102 0.6431 0.4194 0.6588 0.6862 0.6356 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5401 0.5487 0.8341 0.8404 0.5800 0.2671 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5111 0.4061 0.5168 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5211 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
imagesc(new(:,:,y1))
  4 Comments
Kevin Holly
Kevin Holly on 12 Jan 2022
I believe obliqueslice could work here. Although, you will need to calculate the normal vector in order to slice it.
x = -7:7;
z = -7:7;
y = -7:7;
y1 = 0;
imgset = rand(15,15,15);
[X,Z,Y] = meshgrid(x,z,y);
xslice = [];
yslice = [];
zslice = [y1];
figure
SurfaceHandle = slice(X,Z,Y,imgset,xslice,zslice,yslice);
hold on
SurfaceHandle2 = slice(X,Z,Y,imgset,xslice,zslice,yslice);
rotate(SurfaceHandle2,[0,0,1], 30)
view(45,30)
xlim([-10 10])
ylim([-10 10])
zlim([-10 10])
newimgset = imrotate3(imgset,30,[0,0,1]);
figure
[B,x,y,z] = obliqueslice(imgset,[10,10,15],[0,1, 0]);
surf(x,y,z,B,'HandleVisibility','off');
hold on
[B,x,y,z] = obliqueslice(imgset,[10,10,15],[1,0, 0]);
surf(x,y,z,B,'HandleVisibility','off');
[faces, vert]=isosurface(imgset);
p = patch('Faces',faces,'Vertices',vert,'FaceColor','r');
figure
[B,x,y,z] = obliqueslice(newimgset,[10,10,15],[0,1, 0]);
surf(x,y,z,B,'HandleVisibility','off');
hold on
% isosurface(newimgset,'r')
[faces, vert]=isosurface(newimgset);
p = patch('Faces',faces,'Vertices',vert,'FaceColor','g');
[B,x,y,z] = obliqueslice(newimgset,[10,10,15],[1,0, 0]);
surf(x,y,z,B,'HandleVisibility','off');
Note movement of 3D matrix after using imrotate3.
figure
[B,x,y,z] = obliqueslice(imgset,[10,10,15],[0,1, 0]);
surf(x,y,z,B,'HandleVisibility','off');
hold on
[B,x,y,z] = obliqueslice(imgset,[10,10,15],[1,0, 0]);
surf(x,y,z,B,'HandleVisibility','off');
[faces, vert]=isosurface(imgset);
p = patch('Faces',faces,'Vertices',vert,'FaceColor','r');
% SurfaceHandle = slice(X,Z,Y,imgset,xslice,zslice,yslice);
[B,x,y,z] = obliqueslice(newimgset,[10,10,15],[0,1, 0]);
surf(x,y,z,B,'HandleVisibility','off');
hold on
% isosurface(newimgset,'r')
[faces, vert]=isosurface(newimgset);
p = patch('Faces',faces,'Vertices',vert,'FaceColor','g');
[B,x,y,z] = obliqueslice(newimgset,[10,10,15],[1,0, 0]);
surf(x,y,z,B,'HandleVisibility','off');
figure
[B,x,y,z] = obliqueslice(imgset,[10,10,15],[0,1, 0]);
surf(x,y,z,B,'HandleVisibility','off');
hold on
[B,x,y,z] = obliqueslice(imgset,[10,10,15],[1,0, 0]);
surf(x,y,z,B,'HandleVisibility','off');
[B,x,y,z] = obliqueslice(imgset,[10,10,15],[2,1, 0]);
surf(x,y,z,B,'HandleVisibility','off');

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!