Is there a way to change order of dicoms?
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi! I'm creating a code with Matlab to import and process dicoms.
I'd like to load images and I tried to do this with function 'dicomread' and it works, but I'd like change order of images.
For example: if images go from number 1 to 50, the code will load images from 50 to 1, with order (input) that is given by user. Is it possible?
댓글 수: 1
Rik
2018년 4월 26일
That is just a matter of how you make your code. dicomread works on a file by file basis, so it's your choice in what order you read them.
채택된 답변
Jan
2018년 4월 26일
편집: Jan
2018년 4월 26일
X = dicomread(filename);
X = X(:, :, :, size(X, 4):-1:1);
Or maybe:
n = 50;
for k = 1:n
X = dicomread(filename, 'frames', n + 1 - k);
...
end
댓글 수: 2
Jan
2018년 4월 26일
@sc: Did you read my answer and the documentation of dicomread?
x = input ('Insert order of images:'); % No surrounding [ and ]!
Img = dicomread(filename, 'frames', x);
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 DICOM Format에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!