Images to stacks

4 Ansichten (letzte 30 Tage)
Anke
Anke am 18 Mai 2011
Hey there!
I am totally new to mathlab, but I think what I want to do is quiet easy, so I hope someone can help me.
I have sequences of tiff images, which I want to combine into tiff stacks. The file names are numbered, so for stack one it is "name"001001 until "name"001120 and then ...002001 until ...002120 for stack two and so forth.
Right now I am importing them manually into ImageJ and make stacks and save them, but after a few 100 stacks, I am nearly getting crazy..
I searched the file exchange and also all kinds of ImageJ plugins but I am lost.
Can someone help?
Thanks for your support! Anke

Akzeptierte Antwort

Sean de Wolski
Sean de Wolski am 18 Mai 2011
I = zeros(nRows,nCols,nTifImages,'uint8'); %preallocate block
for ii = 1:nTiffImages %loop over image
I(:,:,ii) = imread(sprintf('name%s.tif',num2str(ii+1000,'%06i'))); Set each image to slice
end
Welcome to MATLAB and Answers!

Weitere Antworten (0)

Kategorien

Mehr zu Images finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by