I’m new here & have recently started using ImageJ for the beat-frequency analysis. As I progressed I’ve realized, that it’s necessary to change some default settings e.g. in the “save image sequence”-menu. There are variables, which I have to change constantly to other strictly defined values. By now I’ve understood, that I have to change these values in some file, called “stackwriter.java” (https://imagej.nih.gov/ij/developer/source/ij/plugin/StackWriter.java.html). I couldn’t locate this one in the application’s folder, however I’ve found stackwriter.class and I suppose this is the one I’m searching for. However I haven’t managed to open it using the ImageJ/Plugins/macros/edit as it opens only txt, java and one more type of files. I have also tried jedit & EditPlus in the latest versions. These two open the file, but don’t display it properly. Can someone help me to find a solution, how to edit the existing plugin files(.class extention I guess) in ImageJ?
you do not need to change StackWriter.java source code. If you want to save your data using the “Image Sequence…” command with strictly defined values, just do it once with the command recorder active (Plugins > Macros > Record…).
This will give you a one line macro that, when you run it, will call the “Image Sequence…” command and feed it with the desired parameters.
Thank you for the reply. I’ve tried it your way, however it always wants to save the sequence under the same name in the same folder. Can I e.g. only set up the changing of these 2 values without a certain folder/file name, as I have to change them manually? I actually want to see the same dialog window with just different values in 2 fields.
In that case, you could try and omit the name and save parameters, like this:
run("Image Sequence... ", "format=TIFF start=0 digits=4");
which will use the original file name and prompt you for a target folder.
Or you could ask users for a new name and use it in the command’s parameters like this:
name = getString("New name",""); run("Image Sequence... ", "format=TIFF name="+name+" start=0 digits=4" );
Thank you Jerome!