Save .tif stack to .tif image sequence.

13 ビュー (過去 30 日間)
Alok Kumar Dubey
Alok Kumar Dubey 2019 年 4 月 1 日
コメント済み: Anushka Kapoor 2020 年 10 月 8 日
I have stack of 1000 frames in the form of .tif (stack) eg 'EGFRwt_a4900_p65_e50ms_01.tif' (512x512x1000). I need to save them as image sequence (i.e. 1 frame per file) eg 'EGFRwt_a4900_p65_e50ms_01_0001.tif', 'EGFRwt_a4900_p65_e50ms_01_0002.tif', 'EGFRwt_a4900_p65_e50ms_01_0003.tif'......, 'EGFRwt_a4900_p65_e50ms_01_1000.tif'.
Please help me
Thanks in advance.

採用された回答

KSSV
KSSV 2019 年 4 月 1 日
Let I be your stack of size (512x512x1000).
for i = 1:1000
filename = ['EGFRwt_a4900_p65_e50ms_01_',sprintf('%04d',i),'.tif']
imwrite(I(:,:,i),filename) ;
end
  2 件のコメント
Alok Kumar Dubey
Alok Kumar Dubey 2019 年 4 月 1 日
Thanks KSSV,
It worked very well.
Anushka Kapoor
Anushka Kapoor 2020 年 10 月 8 日
Do the files need to be in the directory for this code? And when you say "Let I be for stack", is there a specific input for I as it is undefined?

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeData Import and Analysis についてさらに検索

製品


リリース

R2016b

Community Treasure Hunt

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

Start Hunting!

Translated by