>># Acquire the online dF/F and imaging time-series >># runPlugIn("BeanShellRunner_", "Labjack_sequence.bsh") >> >># retrieve the acquired image >>image = WindowManager.getCurrentImage() >># get the "autonamed" name for the data >>runName = image.getTitle() >>runName = runName[:runName.find(".")] >># run an ImageJ analysis macro on the raw data >>IJ.runMacroFile("HolographicAnalysis2_40x.txt") >># get the resulting Composite image and >># make an RGB image from it (the "Overlay" image) >>ip = WindowManager.getImage("Composite") >>ip2 = ImagePlus("Composite_RGB", ip.getBufferedImage()) >>ip2.show() >># load a Layout template >>layout = Layout("layouts" + os.sep + "HoloProtocol2.layout.template") >>IJ.runMacro("selectWindow('Composite')") >>IJ.run("Split Channels") >> >># load the layout with new images >>layout.setLayoutComponent(0, WindowManager.getImage("C2-Composite")) >>layout.setLayoutComponent(1, WindowManager.getImage("C3-Composite")) >>layout.setLayoutComponent(2, WindowManager.getImage("C1-Composite")) >>layout.setLayoutComponent(3, WindowManager.getImage("Composite_RGB")) >>layout.repaint() >> >># load the dF/F data for a Chart >>waveManager = WaveManager.getInstance() >>waveManager.clear() >>IJ.runMacro("selectWindow('"+str(Configuration_.getLastStreamLength())+"')") >>waveManager.importWave() >>waveManager.plot() >> >># load the Chart into the layout >>charts = WindowManager.getCharts() >>layout.setLayoutComponent(0, charts[0]) >>layout.repaint() >> >># add a label >>layout.addText(runName, 25, 25) >># autosave the layout as a .tif and a reloadable .layout file >>layout.saveLayout(runName + "layout.layout") >>layout.exportToTiff(runName + "layout.tif") >> |