Finding maximum axial slice location from 3D binary label
이전 댓글 표시
Hello,
I want to find the maximum axial slice location/number/position of a 3D binary mask.

which means the slice location where the binary mask ends.
댓글 수: 2
darova
2020년 4월 17일
What about min and max?
답변 (1개)
darova
2020년 4월 17일
- Use find to find all values
- Use ind2sub to convert indices to i,j,k (x,y,z)
ix = find(V(:)); % find nonzero values
[i1,i2,i3] = ind2sub(size(V),ix); % convert to i,j,k
[~,imax1] = max(i1); % max i
[~,imax2] = max(i2); % max j
[~,imax3] = max(i3); % max k
plot3(i1(imax1),i2(imax1),i3(imax1),'.r')
카테고리
도움말 센터 및 File Exchange에서 Display Image에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

