필터 지우기
필터 지우기

Deleting a a part of a dimension in a 4D array

조회 수: 6 (최근 30일)
Med_Imager
Med_Imager 2012년 2월 8일
댓글: the cyclist 2019년 5월 24일
Hi,
I have a 4D array of MR images that are 64 x 64 x 128 x 16. side=64 # of images=128 # of slices in one image=16
I want to delete the last 6 of the slices
So basically, I want my array to look like 64 x 64 x 128 x 10
Can someone please help me. Thanks!

채택된 답변

the cyclist
the cyclist 2012년 2월 8일
If X is your array, then
X(:,:,:,11:end) = [];
removes the 11th-16th slices in the 4th dimension.
  댓글 수: 4
Madeleine Dacey
Madeleine Dacey 2019년 5월 22일
How would you remove just one of the volumes? i.e. say you want to remove only the 11th image.
the cyclist
the cyclist 2019년 5월 24일
X(:,:,:,11) = [];

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Sean de Wolski
Sean de Wolski 2012년 2월 8일
V = V(:,:,:,1:10); %all rows, all columns, all pages, 1:10, 4ds

카테고리

Help CenterFile Exchange에서 DICOM Format에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by