2017-10-24 4 views

答えて

0

画像が論理的に順序付けられていると仮定します(例:image001、image002、image003など) - これを試してください:

setBatchMode(true); 

//retrieve images from directory 
dir = getDirectory("Choose a directory of images..."); 
list = getFileList(dir); 

for (i=0; i <list.length; i++) { 
    path = dir + list[i]; 
    open(path); 
} 
run("Images to Stack", "name=Stack title=[] use"); 
stackImage = getTitle(); 

//make an average intensity image 
run("Z Project...", "projection=[Average Intensity]"); 

//save out to new folder 
outputPath = dir + File.separator + "separateFolder"; 
if (!File.exists(outputPath)) File.makeDirectory(outputPath); 
newPath = outputPath + File.separator + "averagedImage"; 
run("Save","save=[newPath]"); 
close(stackImage); 
close(); 

setBatchMode(false); 
関連する問題