File tree Expand file tree Collapse file tree 3 files changed +17
-3
lines changed Expand file tree Collapse file tree 3 files changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -203,8 +203,22 @@ else if (fsm.isDone())
203
203
* the argument string to be retrieved through the IJ1 built-in
204
204
* macro function {@code getArgument()}
205
205
*/
206
+ public void runBARMacro (final String path , final String arg ) {
207
+ runIJ1Macro ("scripts/BAR/" + path , arg );
208
+ }
209
+
210
+ /**
211
+ * Legacy method that supports IJ1 macros that do not use script parameters.
212
+ * Ported from {@link Macro_Runner#runMacroFromJar(String, String)}.
213
+ *
214
+ * @param path
215
+ * the path to the IJ1 macro in the BAR jar file
216
+ * @param arg
217
+ * the argument string to be retrieved through the IJ1 built-in
218
+ * macro function {@code getArgument()}
219
+ */
206
220
public void runIJ1Macro (final String path , final String arg ) {
207
- final String macro = readContents ("/scripts/" + path , true );
221
+ final String macro = readContents (path , true );
208
222
setStatus ((macro == null ) ? EXCEPTION : (new Macro_Runner ()).runMacro (macro , arg ));
209
223
}
210
224
Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ void customRoutine(double[] values) {
61
61
rt.setValue(colHeading, i, values[i]);
62
62
rt.show("Results");
63
63
runner = new Runner(context);
64
- runner.runIJ1Macro("BAR/ Data_Analysis/Distribution_Plotter.ijm", colHeading);
64
+ runner.runBARMacro(" Data_Analysis/Distribution_Plotter.ijm", colHeading);
65
65
if (!runner.scriptLoaded())
66
66
uiService.showDialog("Profile distributions not plotted.\nCheck console for details", "Error");
67
67
}
Original file line number Diff line number Diff line change 17
17
def plot_distributions ():
18
18
from bar import Runner
19
19
runner = Runner (context )
20
- runner .runIJ1Macro ( "BAR/ Data_Analysis/Distribution_Plotter.ijm" , "NN distance" )
20
+ runner .runBARMacro ( " Data_Analysis/Distribution_Plotter.ijm" , "NN distance" )
21
21
if not runner .scriptLoaded ():
22
22
uiService .showDialog ("Distribution of NN distances not plotted.\n "
23
23
+ "Check console for details" , "Error" )
You can’t perform that action at this time.
0 commit comments