## Use this area to create a log file for tracking output of Trackmate ###### ##### #### ### ## # for i in image_list: ImageJ(); imp = []; match_roi = []; match_count = 1; m = re.search('(Batch\d+_\d+_XY\d{2}).*.tif', i); match = m.group(1); quality_value = 0; for j in roi_list: if re.search(match, j): match_roi.append(j); if len(match_roi) >= 1: os.mkdir(image_directory + "Results/" + file_name);
#!/bin/sh ''''exec "$(dirname "$0")"/ImageJ.sh --jython "$0" "$@" # (call again with fiji)''' from org.jpedal import PdfDecoder from ij import ImageJ, ImagePlus import sys if len(sys.argv) != 2: print 'Usage:', sys.argv[0], 'source.pdf' sys.exit(1) ij = None decoder = PdfDecoder(False) decoder.setExtractionMode(PdfDecoder.RAWIMAGES | PdfDecoder.FINALIMAGES) decoder.openPdfFile(sys.argv[1]) for page in range(0, decoder.getPageCount()): decoder.decodePage(page + 1) images = decoder.getPdfImageData() image_count = images.getImageCount() for i in range(0, image_count): name = images.getImageName(i) image = decoder.getObjectStore().loadStoredImage('R' + name) if ij == None: ij = ImageJ() ij.exitWhenQuitting(True) ImagePlus(name, image).show() decoder.flushObjectValues(True) decoder.closePdfFile()
#!/bin/sh ''''exec "$(dirname "$0")"/../fiji --jython "$0" "$@" # (call again with fiji)''' import sys from ij import IJ, ImageJ if len(sys.argv) < 2: print 'Need an output file' sys.exit(1) window = ImageJ() window.hide() IJ.run("Capture Screen ") IJ.save(sys.argv[1]) sys.exit(0)
from org.jpedal import PdfDecoder from ij import ImageJ, ImagePlus import sys if len(sys.argv) != 2: print 'Usage:', sys.argv[0], 'source.pdf' sys.exit(1) ij = None decoder = PdfDecoder(False) decoder.setExtractionMode(PdfDecoder.RAWIMAGES | PdfDecoder.FINALIMAGES) decoder.openPdfFile(sys.argv[1]) for page in range(0, decoder.getPageCount()): decoder.decodePage(page + 1) images = decoder.getPdfImageData() image_count = images.getImageCount() for i in range(0, image_count): name = images.getImageName(i) image = decoder.getObjectStore().loadStoredImage('R' + name) if ij == None: ij = ImageJ() ij.exitWhenQuitting(True) ImagePlus(name, image).show() decoder.flushObjectValues(True) decoder.closePdfFile()
def startIJ(): Main.premain() global currentWindow currentWindow = ImageJ() currentWindow.exitWhenQuitting(True) Main.postmain()
# Fetch all the samples into a local directory from fiji import User_Plugins from ij import IJ, ImageJ, Menus from java.lang import System from os import makedirs, rename from os.path import exists, isdir import urllib ij = ImageJ() menu = User_Plugins.getMenuItem('File>Open Samples') commands = Menus.getCommands() plugin = 'ij.plugin.URLOpener("' samples = System.getProperty('fiji.dir') + '/samples' for i in range(0, menu.getItemCount()): label = menu.getItem(i).getLabel() if label == '-': continue command = commands[label] if command != None and \ command.startswith(plugin) and command.endswith('")'): url = command[len(plugin):-2] slash = url.rfind('/')