How to reorganization all image long z axis

조회 수: 1 (최근 30일)
Tina Hsiao
Tina Hsiao 2022년 7월 1일
댓글: Voss 2022년 7월 13일
Dear all, I have a question and would like to seek your help. There are beam signals. I took several 2D images (x,y) along the z axis, and I would like to reorganise all images along the z axis. Could you please give me some help? (a few images has attached) I would like to combine with 1.5.bmp, 2.0.bmp, 2.5.bmp along the z-axis . Thank you very much : )
  댓글 수: 4
Tina Hsiao
Tina Hsiao 2022년 7월 1일
x and y data is from image, z data is from file name. For example: z= 1.5 mm, the x,y data from the image 1.5.bmp ; z = 2.0mm. the x1,y1, data from the image 2.0.bmp, etc...
Adam Danz
Adam Danz 2022년 7월 1일
slice and sliceViewer may also come in handy, although they don't produce the results you're describing above.

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

채택된 답변

Voss
Voss 2022년 7월 1일
files = dir('*.bmp');
full_file_names = fullfile({files.folder},{files.name});
[~,fn,~] = fileparts(full_file_names);
z = str2double(fn);
figure
hold on
for ii = 1:numel(files)
[I,map] = imread(full_file_names{ii});
warp(z(ii)*ones(size(I)),I,map);
end
xlabel('x')
ylabel('y')
zlabel('z')
  댓글 수: 6
Tina Hsiao
Tina Hsiao 2022년 7월 13일
Thank you very much for your help. It works well : )
Voss
Voss 2022년 7월 13일
You're welcome! I'm glad it's working!

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

추가 답변 (0개)

제품


릴리스

R2017a

Community Treasure Hunt

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

Start Hunting!

Translated by