Skip to content

Instantly share code, notes, and snippets.

//==============================================================================
//
// Project: EDF - Extended Depth of Focus
//
// Author: Alex Prudencio
//
// Organization: Biomedical Imaging Group (BIG)
// Ecole Polytechnique Federale de Lausanne (EPFL), Lausanne, Switzerland
//
// Information: http://bigwww.epfl.ch/demo/edf/
@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>
@miura
miura / testedf.py
Created October 22, 2012 22:55
testing headless edf, for Tischi
from edfgui import ExtendedDepthOfField
from edfgui import ExtendedDepthOfFieldHeadless
from edfgui import Parameters
from ij import IJ
print 'test'
imp = IJ.openImage('http://imagej/nih.gov/ij/images/mri-stack.zip')
edf = ExtendedDepthOfFieldHeadless(imp, Parameters())
# I added a test method in the java file only with IJ.log("test method") to see if instance is sucessfully made
edf.testpp()
@miura
miura / LUT_Inversion_Test.ijm
Created October 30, 2012 21:38
LUT Inversion Test
// LUT Inversion Test
// Created by Jeffrey N. Murphy on 2012.10.30
// Contact on Twitter: @MurphysLab
// http://murphyslab.ca/files/LUT_Inversion_Test.ijm
// added LUT stack output (miura@embl.de)
newImage("Test", "8-bit Ramp", 400, 400, 1);
imgid = getTitle();
print("Grays");
@miura
miura / pom.xml
Created November 8, 2012 13:00
Maven-Scala with ImageJ
<?xml version="1.0" encoding="UTF-8"?>
<!-- >
This pom.xml is for running Scala Script with ImageJ.
run the script with the following command.
mvn scala:script
<-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
@miura
miura / helloscript.scala
Created November 8, 2012 13:31
A test script to be called from pom.xml
import ij._
println ("Hello from external script :-)")
IJ.log("test ij")
IJ.log(IJ.getVersion())
val imp = IJ.openImage("http://imagej.nih.gov/ij/images/blobs.gif")
imp.show()
IJ.wait(2000)
imp.close()
//==============================================================================
//
// 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/
@miura
miura / macrocourse_filedownload.py
Created November 15, 2012 11:25
jython code for downloading course file.
# requires https://github.com/cmci/CourseUtil and JmageJ
from emblcmci import URLSaver
us = URLSaver()
us.run("http://cmci.embl.de/sampleimages/macrocourse.zip")
@miura
miura / numberdStrack.ijm
Created November 15, 2012 11:37
creates a stack with frame numbers printed
macro "create"{
ww = 100;
hh = 30;
slices = 11;
newImage("teststack.tif", "8-bit Black", ww, hh, slices);
for (i = 0; i < slices; i++){
setSlice(i+1);
drawString(i+1, ww/2, hh/2 + 10);
}
}
@miura
miura / imagecalc.ijm
Created November 16, 2012 15:43
Image-Clicking based Calculator (demo for the course)
// calculater based on an Image.
// kota MIura
ww = 300;
hh = 600;
rows = 7;
newImage("Calc", "8-bit Black", ww, hh, 1);
setFont("Monospaced", 14, "bold");
setColor(255, 255, 255);
drawString("Exit: Right Click", 10, hh - 15);