Skip to content

Instantly share code, notes, and snippets.

Avatar
🛸
Technology!

Curtis Rueden ctrueden

🛸
Technology!
View GitHub Profile
@ctrueden
ctrueden / scifio.py
Last active Mar 1, 2022
Open images as numpy arrays using SCIFIO and Bio-Formats
View scifio.py
#!/usr/bin/env python
#
# scifio.py - Open images as numpy arrays using SCIFIO and Bio-Formats.
#
# -- Settings --
max_mem_mb = '6144'
scifio_lifesci = False
@ctrueden
ctrueden / bio-formats.py
Last active Feb 18, 2022
Jython example script for working with the Bio-Formats API in Fiji.
View bio-formats.py
# read in and display ImagePlus object(s)
from loci.plugins import BF
file = "/Users/curtis/data/tubhiswt4D.ome.tif"
imps = BF.openImagePlus(file)
for imp in imps:
imp.show()
# read in and display ImagePlus(es) with arguments
from loci.common import Region
from loci.plugins.in import ImporterOptions
@ctrueden
ctrueden / generate-pyramid-resolutions.py
Created Sep 28, 2021
Generate OME-TIFF pyramids using Python
View generate-pyramid-resolutions.py
#!/usr/env/bin python
# Generate pyramidal OME-TIFF.
# Adapted from:
# https://github.com/ome/bio-formats-examples/blob/88d3f109093fb3350242061b00624af001f495e8/src/main/java/GeneratePyramidResolutions.java#L39-L43
import sys
import scyjava
@ctrueden
ctrueden / console.log
Last active Sep 17, 2021
sciview-canary crash 2021-09-17
View console.log
Started application as PID 272117
imagej-launcher version bigger that non-working version (6.0.1 vs. 4.0.5), all good.
This is sciview / scenery, development version ( / (9877ce))
Resetting language to Python
WARNING did not load JythonAutoCompletions
Loaded Deferred Shading (Deferred Shading, with HDR postprocessing and FXAA)
Creating Vulkan instance with extensions VK_KHR_xlib_surface,VK_KHR_surface and layers
Physical devices:
0: Nvidia NVIDIA GeForce GT 1030 (DiscreteGPU, driver version 470.252.64, Vulkan API 1.2.175) (selected)
1: (Unknown vendor) llvmpipe (LLVM 12.0.0, 256 bits) (CPU, driver version 0.0.1, Vulkan API 1.0.2)
@ctrueden
ctrueden / maven-cp.pl
Created Sep 21, 2012
Simple Perl script to obtain classpath for a given Maven GAV
View maven-cp.pl
#!/usr/bin/perl
#
# maven-cp.pl
#
# A script to output a Java classpath for the given Maven GAVs,
# including their dependencies.
# Requires command line mvn to be installed.
@ctrueden
ctrueden / notes.groovy
Created Oct 15, 2020
2020-10-15 ImageJ2.js meeting notes
View notes.groovy
#@ CommandService cs
#@ ModuleService ms
#@ ScriptService ss
modules = ms.getModules() // get all modules!
future = ms.run(modules[0], true, listOrMapOfArguments)
// if you want to block till completion:
m = future.get()
outputs = m.getOutputs() // is a dict
View imagej-js.pom
<?xml version="1.0" encoding="UTF-8"?>
<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>
<parent>
<groupId>org.scijava</groupId>
<artifactId>pom-scijava</artifactId>
<version>29.2.0</version>
<relativePath />
</parent>
View gh-pages-packages.log
$ conda create -n gh-pages rb-github-pages
...
$ conda activate gh-pages
$ conda list
# packages in environment at /usr/local/miniconda3/envs/gh-pages:
#
# Name Version Build Channel
ca-certificates 2019.6.16 hecc5488_0 conda-forge
gdbm 1.18 h0da4bb5_1 conda-forge
gettext 0.19.8.1 h46ab8bc_1002 conda-forge
View obsolete-N5-files.txt
jars/api-common-1.8.1.jar -- IS OBSOLETE (Java-8 file is: Fiji-Pristine.app/jars/api-common-1.9.0.jar)
jars/auto-value-annotations-1.7.jar -- IS OBSOLETE (Java-8 file is: Fiji-Pristine.app/jars/auto-value-annotations-1.7.jar)
jars/aws-java-sdk-core-1.11.719.jar -- IS OBSOLETE (Java-8 file is: Fiji-Pristine.app/jars/aws-java-sdk-core-1.11.796.jar)
jars/aws-java-sdk-kms-1.11.719.jar -- IS OBSOLETE (Java-8 file is: Fiji-Pristine.app/jars/aws-java-sdk-kms-1.11.796.jar)
jars/aws-java-sdk-s3-1.11.719.jar -- IS OBSOLETE (Java-8 file is: Fiji-Pristine.app/jars/aws-java-sdk-s3-1.11.796.jar)
jars/commons-compress-1.19.jar -- IS OBSOLETE (Java-8 file is: Fiji-Pristine.app/jars/commons-compress-1.20.jar)
jars/error_prone_annotations-2.3.4.jar -- IS OBSOLETE (Java-8 file is: Fiji-Pristine.app/jars/error_prone_annotations-2.3.4.jar)
jars/gax-1.54.0.jar -- IS OBSOLETE (Java-8 file is: Fiji-Pristine.app/jars/gax-1.56.0.jar)
jars/gax-httpjson-0.71.0.jar -- IS OBSOLETE (Java-8 file is: Fiji-Pristine.app/jars/gax-httpjson-0.73.
@ctrueden
ctrueden / failures.txt
Last active Jul 15, 2020
Full scan of all JARs on update.imagej.net, update.fiji.sc and sites.imagej.net
View failures.txt
2 ca.mcgill:Sholl_Analysis:3.6.13
1 ca.mcgill:Sholl_Analysis:3.6.2
1 ca.mcgill:Sholl_Analysis:3.7.4
1 ca.mcgill:Sholl_Analysis:4.0.1
1 ch.unibas.biozentrum.imcf:imcf-fiji-toolbars:2.0.2
24 com.github.jeanollion.bacmman:bacmman-core:2.2.4
2 com.github.jeanollion.bacmman:bacmman-core:2.2.5
5 com.github.jeanollion.bacmman:bacmman-core:2.2.9
2 com.github.jeanollion.bacmman:bacmman-core:v2.2.1
1 com.github.jeanollion.bacmman:bacmman-core:v2.2.2