Skip to content

Instantly share code, notes, and snippets.

🤓
💻 🏚 🧰 🚧 ⚠️ 💭 🎶 🔬 💖

Curtis Rueden ctrueden

🤓
💻 🏚 🧰 🚧 ⚠️ 💭 🎶 🔬 💖
Block or report user

Report or block ctrueden

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@ctrueden
ctrueden / SCIFIO_Import_Region.py
Last active May 21, 2019
Import a cropped region of a 2D image using SCIFIO
View SCIFIO_Import_Region.py
#@ DatasetIOService dio
#@ File imageFile
#@ long x
#@ long y
#@ long width
#@ long height
#@output Dataset dataset
from io.scif.config import SCIFIOConfig
from io.scif.img import ImageRegion, Range
@ctrueden
ctrueden / boofcv-seeded-watershed.groovy
Last active Mar 25, 2019
Seeded watershed in ImageJ using BoofCV
View boofcv-seeded-watershed.groovy
#@dependency(group="org.boofcv", module="boofcv-core", version="0.33")
#@dependency(group="org.boofcv", module="boofcv-swing", version="0.32")
#@both ImagePlus imp
#@output ImagePlus (label="Watersheds") watersheds
#@output ImagePlus (label="Regions") regions
#@output ImagePlus (label="Seeds") seeds
import boofcv.alg.filter.binary.BinaryImageOps
import boofcv.alg.filter.binary.ThresholdImageOps
@ctrueden
ctrueden / ImageJ1-with-Jython-via-BeakerX.ipynb
Last active Mar 22, 2019
Use Jython to invoke ImageJ 1.x API in a BeakerX Groovy notebook
View ImageJ1-with-Jython-via-BeakerX.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ctrueden
ctrueden / Open-as-numpy-array-via-Bio-Formats.ipynb
Last active Apr 20, 2019
Open an image with Bio-Formats as a numpy array via pyimagej
View Open-as-numpy-array-via-Bio-Formats.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ctrueden
ctrueden / automatic-module-names.log
Created Mar 1, 2019
Fiji dependencies Automatic-Module-Name entries
View automatic-module-names.log
$ for jar in $(mvn dependency:build-classpath | grep -A1 'Dependencies classpath' | tail -n1 | gsed 's/:/\n/g') # C 1 {2019-03-01 16:41:33}
do
if [ -f "$jar" ]
then
autoModule=$(unzip -q -c "$jar" META-INF/MANIFEST.MF | grep 'Automatic-Module')
if [ "$autoModule" ]
then
echo "$jar: $autoModule"
# else
# echo "$jar: Automatic-Module ENTRY IS MISSING"
@ctrueden
ctrueden / Dynamic-Markdown.ipynb
Created Feb 14, 2019
Rendering Markdown dynamically from BeakerX/Groovy
View Dynamic-Markdown.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ctrueden
ctrueden / Convert-to-ARGB-with-LUT.ipynb
Created Feb 3, 2019
Apply LUT to ImgLib2 image using RealLUTConverter
View Convert-to-ARGB-with-LUT.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ctrueden
ctrueden / ImgLabelingTypeIllustration.java
Created Nov 14, 2018
How does the L type of ImgLabeling<L, I> work?
View ImgLabelingTypeIllustration.java
import java.util.Set;
import net.imagej.ImageJ;
import net.imglib2.FinalDimensions;
import net.imglib2.algorithm.labeling.ConnectedComponents.StructuringElement;
import net.imglib2.img.Img;
import net.imglib2.roi.labeling.ImgLabeling;
import net.imglib2.roi.labeling.LabelingType;
import net.imglib2.type.numeric.IntegerType;
import net.imglib2.type.numeric.integer.UnsignedByteType;
@ctrueden
ctrueden / ops-rois.groovy
Last active Sep 2, 2018
Ops over regions with the imglib2-roi API
View ops-rois.groovy
#@ Img image
#@ OpService ops
import net.imglib2.Interval
import net.imglib2.RandomAccessibleInterval
import net.imglib2.roi.Masks
import net.imglib2.roi.RealMask
import net.imglib2.roi.Regions
import net.imglib2.roi.geom.GeomMasks
import net.imglib2.view.Views
@ctrueden
ctrueden / RecursiveGenericsChallenges.java
Created Aug 31, 2018
Some characteristics of generics, assignability, satisfiability, recursive and otherwise.
View RecursiveGenericsChallenges.java
import java.util.ArrayList;
import java.util.List;
import java.util.function.Function;
import net.imglib2.img.Img;
import net.imglib2.img.array.ArrayImgs;
import net.imglib2.type.numeric.RealType;
import net.imglib2.type.numeric.real.DoubleType;
public class RecursiveGenericsChallenges {
You can’t perform that action at this time.