This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os, re | |
def filterdirs(folderpath): | |
dirs = os.listdir(folderpath) | |
pattern = re.compile('(.*)-(.*)--(.*)') | |
dirlist = [] | |
for d in dirs: | |
if d.startswith('0'): | |
res = re.search(pattern, d) | |
#if int(res.group(1)) > 9 and int(res.group(1)) < 160: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from org.jfree.data.statistics import BoxAndWhiskerCalculator | |
from ij.measure import ResultsTable | |
from java.util import ArrayList, Arrays | |
VERBOSE = True | |
class InstBWC(BoxAndWhiskerCalculator): | |
def __init__(self): | |
pass | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from ij.plugin.filter import GaussianBlur | |
from fiji.threshold import Auto_Local_Threshold as ALT | |
from ij.plugin.filter import ParticleAnalyzer as PA | |
from org.jfree.data.statistics import BoxAndWhiskerCalculator | |
from java.util import ArrayList, Arrays | |
import os | |
# size of juxtanuclear region. In pixels. | |
RIMSIZE = 15 | |
# image background is expected to be black. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# test script for the Centre course | |
# Kota Miura 20131129 | |
# fiji --headless --mem=500m /g/almf/software/scripts2/getIntensityRange3.py '0076-14--2006-01-23' | |
import sys, os, csv, re | |
from ij import ImagePlus, IJ | |
from org.jfree.data.statistics import BoxAndWhiskerCalculator | |
from java.util import ArrayList, Arrays | |
from ij.io import Opener |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a = 1 | |
b = 2 | |
c = a + b | |
print c | |
a = '1' | |
b = '2' | |
c = a + b | |
print c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from ij import IJ | |
IJ.log('write to Log window') | |
#Loading Image, Interactively | |
imp = IJ.openImage() | |
imp.show() | |
#Loading image, defined path |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os, sys | |
from ij.plugin.filter import ParticleAnalyzer as PA | |
# size of juxtanuclear region. In pixels. | |
RIMSIZE = 15 | |
def roiRingGenerator(r1): | |
""" Create a band of ROI outside the argument ROI. | |
See Liebel (2003) Fig. 1 | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
setBatchMode(true); | |
title = getTitle(); | |
c1 = "C1-" + title; | |
c2 = "C2-" + title; | |
run("Split Channels"); | |
selectWindow(c1); | |
c1ID = getImageID(); | |
selectWindow(c2); | |
c2ID = getImageID(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Curve fitting example | |
// see class CurveFitter | |
// http://rsb.info.nih.gov/ij/developer/api/ij/measure/CurveFitter.html | |
// 20110412 Kota | |
//creat example data arrays | |
var xa = [1, 2, 3, 4]; | |
var ya = [3, 3.5, 4, 4.5]; | |
//construct a CurveFitter instance |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
x = newArray(0); | |
a1 = newArray(1, 2, 3); | |
a2 = newArray(10, 20, 30); | |
//accumulate arrays in a single array | |
x = Array.concat(x, a1); | |
x = Array.concat(x, a2); | |
Array.print(x); | |
//slicing a range |
OlderNewer