Skip to content

Instantly share code, notes, and snippets.

View ctrueden's full-sized avatar
🛸
Experiencing technical difficulties

Curtis Rueden ctrueden

🛸
Experiencing technical difficulties
View GitHub Profile
@ctrueden
ctrueden / X.java
Last active August 29, 2015 14:01
ImageJ launcher --main-class flag
package foo;
public class X {
public static void main(String... args) {
System.out.println("<---------- Hello world! --------->");
}
}
@ctrueden
ctrueden / Colorized_Rotation.java
Last active August 29, 2015 14:01
ImageJ: colorize an image and rotate it
import ij.IJ;
import ij.ImagePlus;
import ij.ImageStack;
import ij.plugin.PlugIn;
import ij3d.ImageJ3DViewer;
public class Colorized_Rotation implements PlugIn {
@Override
public void run(String arg) {
// convert to grayscale image with RGB type
@ctrueden
ctrueden / log.txt
Last active August 29, 2015 14:02
Dependency resolution of omero:blitz:5.0.2-ice35-b26
mvn -U dependency:list
[INFO] Scanning for projects...
[INFO]
[INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building sauce 0.1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
Downloading: http://artifacts.openmicroscopy.org/artifactory/repo/ome/bio-formats/5.0.2-ice35-b26/bio-formats-5.0.2-ice35-b26.pom
Downloading: http://repo.maven.apache.org/maven2/ome/bio-formats/5.0.2-ice35-b26/bio-formats-5.0.2-ice35-b26.pom
@ctrueden
ctrueden / dialog-test.bsh
Created June 11, 2014 17:44
Dialog behavior test
// AWT
final java.awt.Dialog dialog = new java.awt.Dialog(null, "Hello AWT");
dialog.addWindowListener(new java.awt.event.WindowAdapter() {
public void windowClosing(java.awt.event.WindowEvent e) { dialog.dispose(); }
});
dialog.setSize(300, 100);
dialog.setVisible(true);
// Swing
jdialog = new javax.swing.JDialog(null, "Hello Swing");
jdialog.setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
@ctrueden
ctrueden / bad.txt
Created June 11, 2014 21:12
Blitz diff
META-INF/
META-INF/MANIFEST.MF
allclasses-frame.html
allclasses-noframe.html
constant-values.html
deprecated-list.html
help-doc.html
index-all.html
index.html
loci/
diff --git a/jython.txt b/jython-standalone.txt
index 90afa0c..b5366f6 100644
--- a/jython.txt
+++ b/jython-standalone.txt
@@ -1,3 +1,463 @@
+BaseHTTPServer$py.class
+CGIHTTPServer$py.class
+ConfigParser$py.class
+Cookie$py.class
+DocXMLRPCServer$py.class
@ctrueden
ctrueden / StringConcat.java
Created August 25, 2014 16:53
Repeated string concatenation is _much_ more expensive in both time and space
import java.util.Random;
public class StringConcat {
public static String str;
public static void goSlow(String[] array) {
final long start = System.currentTimeMillis();
String s = "";
for (int i=0; i<array.length; i++) {
s += array[i];
@ctrueden
ctrueden / what-uses-imglib1.txt
Created October 14, 2014 21:33
What uses ImgLib1?
3D_Viewer/src/main/java/ij3d/ImgLibVolume.java:import mpicbg.imglib.cursor.LocalizableByDimCursor;
3D_Viewer/src/main/java/ij3d/ImgLibVolume.java:import mpicbg.imglib.image.Image;
3D_Viewer/src/main/java/ij3d/ImgLibVolume.java:import mpicbg.imglib.type.numeric.RealType;
3D_Viewer/src/main/java/ij3d/ImgLibVolume.java:import mpicbg.imglib.outofbounds.OutOfBoundsStrategyValueFactory;
3D_Viewer/src/main/java/marchingcubes/MCCube.java:import mpicbg.imglib.container.shapelist.ShapeList;
3D_Viewer/src/main/java/marchingcubes/MCTriangulator.java:import mpicbg.imglib.image.Image;
3D_Viewer/src/main/java/marchingcubes/MCTriangulator.java:import mpicbg.imglib.type.numeric.RealType;
Descriptor_based_registration/src/main/java/plugin/Descriptor_based_registration.java:import mpicbg.imglib.multithreading.SimpleMultiThreading;
Descriptor_based_registration/src/main/java/process/Matching.java:import mpicbg.imglib.algorithm.scalespace.DifferenceOfGaussian.SpecialPoint;
Descriptor_based_registration/src/main/java/process/Match
@ctrueden
ctrueden / after.txt
Created October 29, 2014 21:36
OPS thresholding bug
true 45105
false 222
false 4999
true 53948
false 52523
true 45204
true 56555
true 53332
false 17768
true 61922
@ctrueden
ctrueden / BioFormatsFun.java
Last active August 29, 2015 14:08
Bio-Formats fun: messing with OME-XML, etc.
import ij.ImagePlus;
import java.io.IOException;
import loci.common.xml.XMLTools;
import loci.formats.FormatException;
import loci.formats.ome.OMEXMLMetadata;
import loci.plugins.in.ImagePlusReader;
import loci.plugins.in.ImportProcess;
import loci.plugins.in.ImporterOptions;