Reputation: 63
I have a indexed 3D image A, that I can visualize with isosurface. If I create another version of the same image using ind2sub, when I plot it with plot3, one of the axes is flipped.
Here is an example:
isosurface(A)
[x, y, z] = ind2sub(size(A),find(A==1));
plot3(x, y, z,'b.');
And here and example image:
Is this a normal behavior or am I missing anything in the process?
If I go back in the process I reach the same point:
Y = zeros(size(A));
Y(sub2ind(size(A), x, y, z))=1;
Obviously, isequal(A,Y) gives 1.
Upvotes: 2
Views: 132