本文整理汇总了Java中ij.plugin.frame.Recorder.saveCommand方法的典型用法代码示例。如果您正苦于以下问题:Java Recorder.saveCommand方法的具体用法?Java Recorder.saveCommand怎么用?Java Recorder.saveCommand使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ij.plugin.frame.Recorder
的用法示例。
在下文中一共展示了Recorder.saveCommand方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: recordMacro
import ij.plugin.frame.Recorder; //导入方法依赖的package包/类
public void recordMacro() {
if(Recorder.record) {
String oldCommand = Recorder.getCommand();
Recorder.setCommand("Show results table");
Recorder.recordOption("action", getMacroName());
params.recordMacroOptions();
Recorder.saveCommand();
Recorder.setCommand(oldCommand);
}
}
示例2: DefaultOperation
import ij.plugin.frame.Recorder; //导入方法依赖的package包/类
public DefaultOperation() {
this.name = getName();
//dummy record the param options
boolean oldRecording = Recorder.record;
Recorder.record = true;
params.recordMacroOptions();
options = Recorder.getCommandOptions();
if(!oldRecording) Recorder.saveCommand(); // remove from macro recorder if not recording!
Recorder.record = oldRecording;
}
示例3: recordReset
import ij.plugin.frame.Recorder; //导入方法依赖的package包/类
public static void recordReset() {
if(Recorder.record) {
Recorder.setCommand(SHOW_TABLE_COMMAND);
Recorder.recordOption(ACTION_KEY, RESET);
Recorder.saveCommand();
}
}
示例4: recordUndoOrRedo
import ij.plugin.frame.Recorder; //导入方法依赖的package包/类
public static void recordUndoOrRedo() {
if(Recorder.record) {
Recorder.setCommand(SHOW_TABLE_COMMAND);
Recorder.recordOption(ACTION_KEY, UNDO_REDO);
Recorder.saveCommand();
}
}
示例5: recordChangeColumnUnits
import ij.plugin.frame.Recorder; //导入方法依赖的package包/类
public static void recordChangeColumnUnits(String column, MoleculeDescriptor.Units targetUnits) {
if(Recorder.record) {
Recorder.setCommand(SHOW_TABLE_COMMAND);
Recorder.recordOption(ACTION_KEY, CHANGE_COLUMN_UNITS);
Recorder.recordOption(COLUMN_KEY, column);
Recorder.recordOption(TARGET_UNITS_KEY, targetUnits.toString());
Recorder.saveCommand();
}
}
示例6: recordChangeAllUnits
import ij.plugin.frame.Recorder; //导入方法依赖的package包/类
public static void recordChangeAllUnits(boolean analog) {
if(Recorder.record) {
Recorder.setCommand(SHOW_TABLE_COMMAND);
Recorder.recordOption(ACTION_KEY, CHANGE_ALL_UNITS);
Recorder.recordOption(TARGET_UNITS_KEY, analog ? ANALOG : DIGITAL);
Recorder.saveCommand();
}
}
示例7: load
import ij.plugin.frame.Recorder; //导入方法依赖的package包/类
private void load(String path)
{
inputFilename = path;
// Record this as a single load of the results manager.
// This should support any dialogs that are presented in loadInputResults(...)
// to get the calibration.
if (Recorder.record)
{
Recorder.setCommand("Results Manager");
Recorder.recordOption("input", INPUT_FILE);
Recorder.recordOption("input_file", path);
Recorder.recordOption("image",
SettingsManager.getResultsImageTypeNames()[ResultsImageType.DRAW_NONE.getNumber()]);
Recorder.recordOption("results_file", "[]");
Recorder.recordOption("save_to_memory");
}
MemoryPeakResults results = loadInputResults(INPUT_FILE, true, null, null);
if (results == null || results.size() == 0)
{
IJ.error(TITLE, "No results could be loaded from " + path);
}
else
{
if (Recorder.record)
Recorder.saveCommand();
MemoryPeakResults.addResults(results);
}
}
示例8: run
import ij.plugin.frame.Recorder; //导入方法依赖的package包/类
@Override
public void run()
{
ImagePlus imp = WindowManager.getImage(model.getSelectedImage());
// Ensure the optimiser is recorded by the Macro recorder
Recorder.setCommand("FindFoci Optimiser");
optimiser.run(imp);
Recorder.saveCommand();
}
示例9: addFindFociCommand
import ij.plugin.frame.Recorder; //导入方法依赖的package包/类
private synchronized void addFindFociCommand(OutputStreamWriter out, Options bestOptions, String maskTitle)
throws IOException
{
if (bestOptions == null)
return;
// This is the only way to clear the recorder.
// It will save the current optimiser command to the recorder and then clear it.
Recorder.saveCommand();
// Use the recorder to build the options for the FindFoci plugin
Recorder.setCommand("FindFoci");
Recorder.recordOption("mask", maskTitle);
Recorder.recordOption("background_method", FindFoci.backgroundMethods[bestOptions.backgroundMethod]);
Recorder.recordOption("Background_parameter", "" + bestOptions.backgroundParameter);
Recorder.recordOption("Auto_threshold", bestOptions.autoThresholdMethod);
if (backgroundMethodHasStatisticsMode(bestOptions.backgroundMethod))
Recorder.recordOption("Statistics_mode", FindFoci.getStatisticsMode(bestOptions.options));
Recorder.recordOption("Search_method", FindFoci.searchMethods[bestOptions.searchMethod]);
Recorder.recordOption("Search_parameter", "" + bestOptions.searchParameter);
Recorder.recordOption("Minimum_size", "" + bestOptions.minSize);
if ((bestOptions.options & FindFoci.OPTION_MINIMUM_ABOVE_SADDLE) != 0)
Recorder.recordOption("Minimum_above_saddle");
if ((bestOptions.options & FindFoci.OPTION_CONTIGUOUS_ABOVE_SADDLE) != 0)
Recorder.recordOption("Connected_above_saddle");
Recorder.recordOption("Minimum_peak_height", FindFoci.peakMethods[bestOptions.peakMethod]);
Recorder.recordOption("Peak_parameter", "" + bestOptions.peakParameter);
Recorder.recordOption("Sort_method", FindFoci.sortIndexMethods[bestOptions.sortIndex]);
Recorder.recordOption("Maximum_peaks", "" + bestOptions.maxPeaks);
Recorder.recordOption("Show_mask", FindFoci.maskOptions[3]);
Recorder.recordOption("Show_table");
Recorder.recordOption("Mark_maxima");
Recorder.recordOption("Mark_peak_maxima");
Recorder.recordOption("Show_log_messages");
if (bestOptions.blur > 0)
Recorder.recordOption("Gaussian_blur", "" + bestOptions.blur);
Recorder.recordOption("Centre_method", FindFoci.getCentreMethods()[bestOptions.centreMethod]);
if (bestOptions.centreMethod == FindFoci.CENTRE_OF_MASS_SEARCH)
Recorder.recordOption("Centre_parameter", "" + bestOptions.centreParameter);
out.write(String.format("# run(\"FindFoci\", \"%s\")\n", Recorder.getCommandOptions()));
// Ensure the new command we have just added does not get recorded
Recorder.setCommand(null);
}