using Images
This file contains hidden or 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
# tools_fiji.py | |
from ij import ImagePlus, ImageStack, IJ | |
print('tools_fiji.py loaded.') | |
# Image load/save | |
# Open a list of files. |
This file contains hidden or 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
#!/usr/bin/env python | |
import matplotlib.pyplot as plt | |
import glob | |
import csv | |
y_mins = [] | |
file_list = glob.glob('*.csv') | |
print('Reading %d files...\n' % len(file_list)) |
This file contains hidden or 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
# Calculate trajectories using data from find_cells-headless.fiji.py | |
import csv | |
import sys | |
def norm_sq(a, b): | |
return (a[0] - b[0]) ** 2 + (a[1] - b[1]) ** 2 | |
This file contains hidden or 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
# This script runs on Fiji. | |
# Just drag and drop this file into a Fiji window. | |
# You can also use headless mode | |
# > /Applications/Fiji.app/Contents/MacOS/ImageJ-macosx --headless \ | |
# > find_cells-headless.fiji.py /path/to/movie.avi | |
from ij import IJ, ImageStack, ImagePlus | |
from ij.process import ImageProcessor, ImageConverter | |
from ij.plugin import ImageCalculator, AVI_Reader, ZProjector, HyperStackConverter | |
from ij.plugin.filter import GaussianBlur, Analyzer, ParticleAnalyzer |
This file contains hidden or 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
# This script runs on Fiji. | |
# Just drag and drop this file into a Fiji window. | |
from ij import IJ, ImageStack, ImagePlus | |
from ij.process import ImageProcessor | |
from ij.plugin import ImageCalculator, ZProjector | |
from ij.plugin.filter import GaussianBlur, Analyzer, ParticleAnalyzer | |
from ij.measure import Measurements | |
import sys |
This file contains hidden or 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 | |
from ij.measure import ResultsTable | |
from ij.plugin.filter import ParticleAnalyzer | |
import time | |
def analyze(path): | |
IJ.open(path) | |
IJ.run("16-bit"); | |
IJ.run("Auto Threshold", "method=Minimum"); |
This file contains hidden or 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
-- Generate NC files for PRODIA M45 | |
module Main where | |
import Prelude | |
import Math hiding (log) | |
import Data.Array | |
import Data.Monoid | |
-- import Data.List (foldl) |
This file contains hidden or 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 Data.List | |
import Data.Monoid | |
import Text.Printf | |
data Sgn = Posi | Neg deriving Eq | |
data FP = FP Int Int Sgn | FPInt Int | FPDouble Double | |
add :: Double -> FP -> FP | |
add v (FPDouble a) = FPDouble (a + v) |
This file contains hidden or 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
# hiroutil.py | |
from ij import ImageStack, IJ | |
def load_stack(w,h,paths): | |
stk = ImageStack(w,h) | |
for path in paths: | |
ip = IJ.openImage(path).getProcessor() | |
stk.addSlice(ip) |