- Auto contrast (.ijm)
-
Cropping files using file list and ROIs saved on Gist.
-
Crop and merge images by ROIs (.py)
def rgb2gray(rgb): | |
r, g, b = rgb[0,:,:], rgb[1,:,:], rgb[2,:,:] | |
gray = 0.2989 * r + 0.5870 * g + 0.1140 * b | |
return gray | |
def compute(img): | |
try: | |
# print('Computing...') | |
import time, socket |
# 'compute' is distributed to each node running 'dispynode'; | |
# runs on each processor in each of the nodes | |
from compute import compute,search,rgb2gray | |
def main(n): | |
import dispy, random | |
import logging | |
import tifffile as tiff | |
import time |
# 'compute' is distributed to each node running 'dispynode'; | |
# runs on each processor in each of the nodes | |
from compute_simplest import compute,search | |
def main(n): | |
import dispy | |
import logging | |
import time | |
import numpy as np |
def compute(i): | |
import time,socket | |
host = socket.gethostname() | |
time.sleep(1) | |
return (host, i) | |
def search(): | |
import fnmatch | |
import os |
Cropping files using file list and ROIs saved on Gist.
Crop and merge images by ROIs (.py)
# Make time lapse of stitched image. | |
# Uses Numpy, Scipy, and tifffile | |
import numpy as np # numpy | |
import tifffile # tifffile | |
import cv2 # opencv | |
from scipy.ndimage.interpolation import zoom # scipy | |
import json | |
original_side = 1024 |
require 'kconv' | |
require 'mail' # gem install mail | |
require 'csv' | |
def parse_message(message) | |
m = Mail.new(message) | |
o = {:id => m.message_id, :from => m.from, :to => m.to, :subject => m.subject, :reply => m.in_reply_to, :date => m.date, :ref => m.references} | |
p o | |
o | |
end |
import matplotlib.pyplot as plt | |
import csv | |
import numpy as np | |
ns = [] | |
ms = [] | |
with open('result.csv','rb') as f: | |
reader = csv.reader(f) | |
for row in reader: | |
if not row[3].startswith('Fwd'): |
// Move to next slice, and reset scale, autocontrast, and make 250x250 rect. | |
run("Select None"); | |
run("Next Slice [>]"); | |
run("Set Scale...", "distance=0 known=0 pixel=1 unit=pixel"); | |
resetMinAndMax(); | |
run("Enhance Contrast", "saturated=0.3"); | |
run("Specify...", "width=250 height=250 x=256 y=256"); |
import requests | |
import keyring | |
import json | |
import csv | |
gist_images = 'XXXX' | |
gist_rois = 'YYYY' | |
username = 'ZZZZ' | |
password = keyring.get_password('Github API', username) |