Skip to content

Instantly share code, notes, and snippets.

import os
import re
import tifffile
# adjust to dataset:
input_dir = "PATH_TO_TIFFS"
pixel_size = 0.225
maximum_shift_microns = 50
@frauzufall
frauzufall / app.js
Created September 21, 2019 10:46
Exporting gitter to HTML
'use strict';
const fs = require('fs');
var http = require('http');
http.createServer(function (req, res) {
res.setHeader("Content-Type", "text/html");
let rawdata = fs.readFileSync('imagej-imagej.json');
let room = JSON.parse(rawdata);
room.sort(function(a,b) {
if ( a.sent < b.sent )
return -1;
@frauzufall
frauzufall / gist:bcac3921d2ea6e0f19cd5edfba0df794
Created August 9, 2019 11:37
Macro running skeleton analysis in batch mode
#@ File (label = "Input directory", style = "directory") input
#@ File (label = "Output directory", style = "directory") output
#@ String (label = "File suffix", value = ".jpg") suffix
processFolder(input);
function processFolder(input) {
list = getFileList(input);
list = Array.sort(list);
for (i = 0; i < list.length; i++) {
@frauzufall
frauzufall / ImageJ command line execution
Last active June 11, 2022 11:10
ImageJ command line execution
https://imagej.net/Scripting_Headless
Start a SciJava command from command line:
./ImageJ-linux64 --run org.scijava.plugins.commands.debug.DumpStack
.. headless:
./ImageJ-linux64 --headless --run org.scijava.plugins.commands.debug.DumpStack
Calling a script from command line:
./ImageJ-linux64 --ij2 --headless --console --run hello.py 'name1="Mr",name2="Mrs Kraken"'
@frauzufall
frauzufall / Get all open images in ImageJ.java
Last active June 26, 2019 20:15
Get all open images in ImageJ
// creating images
Object img1 = ij.io().open("https://samples.fiji.sc/blobs.png");
Object img2 = ij.io().open("https://samples.fiji.sc/new-lenna.jpg");
// showing images
ij.ui().show(img1);
ij.ui().show(img2);
// get images
List<Dataset> datasets = ij.dataset().getDatasets();

Installing Nightscout on DigitalOcean Server

Why?

  • You have full SSH access to your server
  • Creating a server takes a minute
  • You can choose from various places on earth where the server should be located
  • You can make a backup / snapshot of the server in order to delete and later restore it (saves money if you don't need it for a while)
  • You pay per hour, the $5 / month version should be sufficient
  • Loads of documentation on how to install things
  • Control and track the server via the DigitalOcean control panel website

Where to find and add algorithms in ImageJ

If you are as confused as I am about how to distinguish algorithms, scripts, macros, plugins, ops, commands and modules, welcome to this page.

TODO needs a class hierarchy view

Space of action

ImgLib2 algorithms

src
../../../addons/ofx2DMapping/src
../../../addons/ofxAccelerometer/src
../../../addons/ofxBlur/src
../../../addons/ofxBox2d/src
../../../addons/ofxBox2d/src/lib/Box2D/Include
../../../addons/ofxBox2d/src/lib/Box2D/Source/Collision
../../../addons/ofxBox2d/src/lib/Box2D/Source/Collision/Shapes
../../../addons/ofxBox2d/src/lib/Box2D/Source/Common