Skip to content

Instantly share code, notes, and snippets.

Avatar
🛸
Technology!

Curtis Rueden ctrueden

🛸
Technology!
View GitHub Profile
@ctrueden
ctrueden / X.java
Last active Aug 29, 2015
ImageJ launcher --main-class flag
View X.java
package foo;
public class X {
public static void main(String... args) {
System.out.println("<---------- Hello world! --------->");
}
}
@ctrueden
ctrueden / Colorized_Rotation.java
Last active Aug 29, 2015
ImageJ: colorize an image and rotate it
View Colorized_Rotation.java
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 Aug 29, 2015
Dependency resolution of omero:blitz:5.0.2-ice35-b26
View log.txt
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
View bad.txt
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/
@ctrueden
ctrueden / dialog-test.bsh
Created Jun 11, 2014
Dialog behavior test
View dialog-test.bsh
// 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);
View diff.diff
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 Aug 25, 2014
Repeated string concatenation is _much_ more expensive in both time and space
View StringConcat.java
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];
View what-uses-imglib1.txt
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 Oct 29, 2014
OPS thresholding bug
View after.txt
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 Aug 29, 2015
Bio-Formats fun: messing with OME-XML, etc.
View BioFormatsFun.java
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;