Dear all,
I want to open many files in Imagej via a a custom macro which will be placed into the the
toolsets folder.
Later on i want to trigger additional events like image calibration withtin this marco. This is also the reason why i do not want to use the stardard open File dialog. I have enabled “Use jFileChooser to open/save” in Edit/Options/Input-Output, such that my default Filedialog aloows me to open multiple images at once.
What i want to achive is this:
- i would like to only show image files with a specific ending ( by default this should be .tif) and nothing else like txt files or other non image data!
- all selected images should be opened
- When an image is closed it should be saved to a new folder with all processing/ annotations etc that have been done to it.
Here is my code:
macro "Calibrate SEM Action Tool - C000 T5e13A"{
// OpenDialog Demo
//
// This macro demonstrates how do use the
// File.openDialog() macro function.
// unfortunately this dialoge allows me to only load one file at a time
path = File.openDialog("Select a File");
//open(path); // open the file
dir = File.getParent(path);
name = File.getName(path);
print("Path:", path);
print("Name:", name);
print("Directory:", dir);
list = getFileList(dir);
print("Directory contains "+list.length+" files");
open(path);
// Here i want to call additional macors to calibrate the image etc
}
Unfortunately this opens only a single file at a time. Furthermore i would also have the option to simply load all files inside a folder with the selected ending.
All help is really appreciated