Skip to content

Commit 9d20575

Browse files
committed
keep debugging
1 parent fef3e6c commit 9d20575

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/java/ai/nets/samj/ij/SAMJ_Annotator.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public class SAMJ_Annotator implements PlugIn {
7474
/**
7575
* Keys required to run deepImageJ with a macro
7676
*/
77-
private final static String[] macroKeys = new String[] {"modelName="};
77+
private final static String[] macroKeys = new String[] {"model="};
7878
/**
7979
* Optional keys to run deepImageJ with a macro or in headless mode
8080
*/
@@ -189,11 +189,13 @@ void runMacro() throws IOException, RuntimeException, InterruptedException {
189189
return;
190190

191191
MACRO_CONSUMER = new Consumer();
192+
MACRO_CONSUMER.setFocusedImage(MACRO_CONSUMER.getFocusedImage());
192193
SAMModel selected = MainGUI.DEFAULT_MODEL_LIST.stream()
193194
.filter(mm -> mm.getName().equals(macroModelName)).findFirst().orElse(null);
194195
if (selected == null)
195196
throw new IllegalArgumentException("Specified model does not exist. Please, for more info visit: "
196197
+ MACRO_INFO);
198+
MACRO_CONSUMER.setModel(selected);
197199
RandomAccessibleInterval<T> rai = MACRO_CONSUMER.getFocusedImageAsRai();
198200
selected.setImage(rai, null);
199201
List<int[]> pointPrompts = MACRO_CONSUMER.getPointRoisOnFocusImage();

0 commit comments

Comments
 (0)