Question about edit the values in DiversePathsJ plugin

Hey everyone i’m trying to set values inside the program with script command
as you see in the picture
but it wont record anything but the open of the plugin
i want to do it automated
to change to dijkstra and bright on dark background and export all rois

how can i do it?
thanks!
imagejdiv|690x344

@Ishay
Have you tried recording in other languages? Such as the ImageJ1 Macro language? From your snapshot - I see that you are recording in Java.

1 Like

It should be working when recorded with the ImageJ1 macro language indeed!

1 Like

i did try with macro language
but its the same

what is imagej1 macro?
is it different?

Here is the ImageJ wiki page on the Macro language:

i change it to macro but still the recorder didn’t catch it

any ideas?

@Virginie ? Any thoughts on why this is? Would the version of ImageJ1.x and/or Fiji make a difference?

this is the dialog inside the jar

/* / private void activateMacro() {
/
845 / String options = Macro.getOptions();
/
846 / String algo = Macro.getValue(options, “algorithm”, defaultAlgo_);
/
847 / if (algo.equalsIgnoreCase(“dijkstra”)) {
/
848 / this.cmbAlgo_.setSelectedItem(algoArray_[0]);
/
849 / } else if (algo.equalsIgnoreCase(“viterbi”)) {
/
850 / this.cmbAlgo_.setSelectedItem(algoArray_[1]);
/
/ } else {
/
852 / IJ.error("Unrecognized algorithm: " + algo +
/
853 / “. Available options are “dijkstra” and “viterbi””);
/
/ }
/
855 / this.spnN_.setValue(Integer.valueOf(Macro.getValue(options, “numpaths”, “1”)));
/
/
/
857 / this.spnCorridor_.setValue(Integer.valueOf(Macro.getValue(options,
/
858 / “corridorsize”, “1”)));
/
859 / this.spnDiversity_.setValue(Integer.valueOf(Macro.getValue(options,
/
860 / “diversity”, “0”)));
/
861 / String target = Macro.getValue(options, “targettype”, defaultTarget_);
/
862 / if (target.equalsIgnoreCase(“dark”)) {
/
863 / this.cmbTarget_.setSelectedItem(targetArray_[0]);
/
864 / } else if (target.equalsIgnoreCase(“bright”)) {
/
865 / this.cmbTarget_.setSelectedItem(targetArray_[1]);
/
/ } else {
/
867 / IJ.error("Unrecognized target type: " + target +
/
868 / “. Available options are “dark” and “bright””);
/
/ }
/
870 / this.spnSigma_.setValue(Double.valueOf(Macro.getValue(options,
/
871 / “gaussianblur”, “3.0”)));
/
872 / String filter = Macro.getValue(options, “processingfilter”,
/
873 / defaultFilter_);
/
874 / if (filter.equalsIgnoreCase(“none”)) {
/
875 / this.cmbFilter_.setSelectedItem(filterArray_[0]);
/
876 / } else if (filter.equalsIgnoreCase(“edm”)) {
/
877 / this.cmbFilter_.setSelectedItem(filterArray_[1]);
/
878 / } else if (filter.equalsIgnoreCase(“edge”)) {
/
879 / this.cmbFilter_.setSelectedItem(filterArray_[2]);
/
880 / } else if (filter.equalsIgnoreCase(“ridge”)) {
/
881 / this.cmbFilter_.setSelectedItem(filterArray_[3]);
/
882 / } else if (filter.equalsIgnoreCase(“external”)) {
/
883 / this.cmbFilter_.setSelectedItem(filterArray_[4]);
/
/ } else {
/
885 / IJ.error("Unrecognized processing filter: " +
/
886 / filter +
/
887 / “. Available options are “none”, “edm”, “ridge”, “edge”, and “external””);
/
/ }
/
889 / this.externalCostMapText_.setText(Macro.getValue(options, “externalcostmap”,
/
890 / “”));
/
891 / String s = new String(Macro.getValue(options, “headless”, “false”));
/
892 / if (s.equals(“true”)) {
/
893 / this.skipDialog_ = true;
/
/ } else {
/
895 */ this.skipDialog_ = false;

can you help me to write the macro code ?
i tried but i only get error messages