Skip to content

Instantly share code, notes, and snippets.

@miura
miura / TurboRegMacro.ijm
Created September 17, 2012 11:45 — forked from schiklen/TurboRegMacro.ijm
Using TurboReg from ImageJ macro, to output shifts.
var npos = 0; // this variable is better be global.
var directapply = 0; // "boolean" user input direct application of driftcorrect
var crop = 0; // "boolean" user input crop to ROI
var splitch = 0; // "boolean" user input splitting of channels
var targetstack = 1 // ImageID of the stack that is to be processed
var dir;
var cropxmax = 0;
var cropymax = 0;
var minout = 0;
var maxout = 0;
@miura
miura / Marimekko.R
Created October 10, 2012 21:32 — forked from dsparks/Marimekko.R
Simplest marimekko/mosaic plot
# Simplest possible marimekko/mosaic plot
doInstall <- TRUE # Change to FALSE if you don't want packages installed.
toInstall <- c("vcd", "ggplot2", "RColorBrewer")
if(doInstall){install.packages(toInstall, repos = "http://cran.us.r-project.org")}
lapply(toInstall, library, character.only = TRUE)
theme_set(theme_gray(base_size = 7))
# All you need to start with is individual count data, and a grouping variable
@miura
miura / gist:3872805
Created October 11, 2012 14:33 — forked from rendicahya/gist:3872597
ImageJ Problem
File file = new File(path);
if (file.exists()) {
ImagePlus image = IJ.openImage(file.getAbsolutePath());
System.out.println(image.getTitle());
ImagePlus[] split = ChannelSplitter.split(image);
if (split != null) {
System.out.println("SPLIT OK");
} else {
@miura
miura / ImageJ Macro.plist
Created October 21, 2012 15:26
ImageJ macro syntax highlighting definition for CotEditor
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>charactersArray</key>
<array>
<dict>
<key>beginString</key>
<string>'</string>
<key>endString</key>
//==============================================================================
//
// Project: EDF - Extended Depth of Focus
//
// Author: Alex Prudencio (headless hack by Kota Miura and Christian Tischer, christian.tischer@embl.de)
//
// Organization: Biomedical Imaging Group (BIG)
// Ecole Polytechnique Federale de Lausanne (EPFL), Lausanne, Switzerland
//
// Information: http://bigwww.epfl.ch/demo/edf/
from fiji.threshold import Auto_Local_Threshold as ALT
from ij.gui import Roi
from imagescience.image import Image
from imagescience.feature import Laplacian
from process3d import Erode_, Dilate_, MinMaxMedian
from process3d import DistanceTransform3D as D3D
from Utilities import Counter3D
from ij.plugin import Thresholder, GaussianBlur3D, ZProjector, Duplicator
from ij.process import ImageProcessor
from fiji.threshold import Auto_Local_Threshold as ALT
from ij.gui import Roi
from imagescience.image import Image
from imagescience.feature import Laplacian
from process3d import Erode_, Dilate_, MinMaxMedian
from process3d import DistanceTransform3D as D3D
from Utilities import Counter3D
from ij.plugin import Thresholder, GaussianBlur3D, ZProjector, Duplicator
from ij.process import ImageProcessor
import os, csv
@miura
miura / gist:6540331
Created September 12, 2013 16:27 — forked from mhawksey/gist:1170597
function onOpen() {
var menuEntries = [ {name: "Create Diary Doc from Sheet", functionName: "createDocFromSheet"}];
var ss = SpreadsheetApp.getActiveSpreadsheet();
ss.addMenu("Fitness Diaries", menuEntries);
}
function createDocFromSheet(){
var templateid = "1O4afl8SZmMxMFpAiN16VZIddJDaFdeRBbFyBtJvepwM"; // get template file id
var FOLDER_NAME = "Fitness Diaries"; // folder name of where to put completed diaries
// get the data from an individual user
function onOpen() {
var menuEntries = [ {name: "Create Diary Doc from Sheet", functionName: "createDocFromSheet"}];
var ss = SpreadsheetApp.getActiveSpreadsheet();
ss.addMenu("Fitness Diaries", menuEntries);
}
function createDocFromSheet(){
var templateid = "1O4afl8SZmMxMFpAiN16VZIddJDaFdeRBbFyBtJvepwM"; // get template file id
var FOLDER_NAME = "Fitness Diaries"; // folder name of where to put completed diaries
// get the data from an individual user
@miura
miura / FRET MAP
Last active December 9, 2016 21:30 — forked from PMLLancao/FRET MAP
Calculation for FRET Maps.
macro "Ratiometric FRET" {
path = getDirectory("Choose a Directory");
list = getFileList(path);
length = list.length;
File.makeDirectory(path + "Imaging/");
//FRET map creation