MCPcopy Create free account
hub / github.com/AstroImageJ/astroimagej / recordOpen

Method recordOpen

ij/src/main/java/ij/plugin/frame/Recorder.java:511–529  ·  view source on GitHub ↗
(String path)

Source from the content-addressed store, hash-verified

509 }
510
511 public static void recordOpen(String path) {
512 if (!recordingEnabled() || !record || path==null)
513 return;
514 path = fixPath(path);
515 String s = scriptMode?"imp = IJ.openImage":"open";
516 boolean openingLut = false;
517 if (scriptMode) {
518 if (isTextOrTable(path))
519 s = "IJ.open";
520 else if (path!=null && path.endsWith(".lut")) {
521 s = "lut = Opener.openLut";
522 openingLut = true;
523 }
524 }
525 textArea.append(s+"(\""+path+"\");\n");
526 ImagePlus imp = WindowManager.getCurrentImage();
527 if (openingLut && imp!=null && !imp.getTitle().endsWith(".lut"))
528 textArea.append("imp.setLut(lut);\n");
529 }
530
531 public static void recordPath(String key, String path) {
532 if (key==null || !recordPath) {

Callers 2

openFileMethod · 0.95
saveCommandMethod · 0.95

Calls 6

recordingEnabledMethod · 0.95
fixPathMethod · 0.95
isTextOrTableMethod · 0.95
getCurrentImageMethod · 0.95
getTitleMethod · 0.95
appendMethod · 0.65

Tested by

no test coverage detected