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 / Linux-Meta-Quest.md
Created July 23, 2025 12:14
Linux + Meta Quest 3S

2025-04-27: The way I play VR games wirelessly on Linux e.g. from Steam is to use WiVRn (a fork of Monado) via the Envision orchestrator.

Here's the path I followed to get it working with my Meta Quest 3S:

  1. Download the appImage as linked from the Envision page of the Linux VR Adventures wiki.

  2. Launch Envision from the terminal (so that you can see its console messages). In the GUI at the bottom is a combo box. Select WiVRn as the desired system. Then at the top of the GUI is a button to configure and build it. You will likely need to apt install some prerequisites first. (2025-04-23) Envision wanted me to installed these packages for Lighthouse profile:

    sudo apt install libeigen3-dev glslang-tools glslc libbsd-dev libdrm-dev \
        libusb-1.0-0 libusb-1.0-0-dev libx11-xcb-dev libxcb-
@ctrueden
ctrueden / 50x50-take-1.png
Last active May 2, 2025 21:22
Image reconstruction from sparse sampling
50x50-take-1.png
@ctrueden
ctrueden / Squash_Plugins_Menu.groovy
Created October 25, 2023 14:30
Fiji Plugins menu too tall
/*
* Is your Fiji installation's Plugins menu too tall on Linux,
* where it runs past the bottom of your screen?
* Here is a hacky script to shrink the font, so that you can
* fit more items before running out of screen real estate!
*
* License: CC0
*/
#@ Float squashFactor (value=0.75f)
@ctrueden
ctrueden / IDE_shortcuts.md
Last active October 11, 2023 08:45
IDE shortcuts
Operation IntelliJ calls it IntelliJ (Win/Linux) IntelliJ (macOS) Eclipse calls it Eclipse (Win/Linux) Eclipse (macOS)
Look up where a variable or class is actually used/referenced Find usages alt+shift+7 alt+F7 Global lookup ctrl+shift+G cmd+shift+G
Move the cursor to the next compile error or warning Jump to next problem F2 F2 Next ctrl+. cmd+.
Show recommended fixes for the selected problem Pop up context actions alt+enter alt+enter Show quick fixes ctrl+1
@ctrueden
ctrueden / MeshCursorTest.java
Created June 14, 2023 10:14
Hacky way to check whether points of a point cloud lie within a mesh
package net.imglib2.mesh.alg;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.function.BiConsumer;
import net.imglib2.Localizable;
import net.imglib2.mesh.io.ply.PLYMeshIO;
@ctrueden
ctrueden / Voxelize.java
Last active June 12, 2023 22:52
Convert a mesh to a binary mask using ImageJ Ops
import java.io.File;
import java.io.IOException;
import net.imagej.Dataset;
import net.imagej.ImageJ;
import net.imagej.mesh.Mesh;
import net.imagej.mesh.io.ply.PLYMeshIO;
import net.imagej.ops.OpService;
import net.imglib2.RandomAccessibleInterval;
import net.imglib2.converter.Converters;
@ctrueden
ctrueden / calibrated-axes-transform.groovy
Created April 28, 2023 17:54
Display an image with non-linear calibrated axes
#@ DatasetService ds
#@ net.imagej.units.UnitService units
#@ UIService ui
// Parameters to play with!
// log-linear equation: cal(raw) = a + b * ln(c + d*raw)
xa = 0; xb = 10; xc = 1; xd = 1 // cal(xRaw) = 10*ln(1+xRaw)
ya = 0; yb = 5000; yc = 1; yd = 3000 // cal(yRaw) = 5000*ln(1+3000*yRaw)
// units
@ctrueden
ctrueden / BOM-Testing.md
Last active September 16, 2022 19:36
Testing BOM components

Background and Context

We have a set of many components (software libraries and/or applications) known as a Bill of Materials (BOM). Many of these components depend on other components, forming a dependency graph (no cycles).

These components are under active development, with new versions being released over time. The BOM lists each component at a specific version, with the idea that all components of the BOM will work successfully together when used as dependencies of a derivative work.

For example, suppose we have the following components:

  • Guava v21 ← no dependencies
  • Math v1 ← depends on Guava v21
@ctrueden
ctrueden / generate-pyramid-resolutions.py
Created September 28, 2021 21:06
Generate OME-TIFF pyramids using Python
#!/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 September 17, 2021 14:26
sciview-canary crash 2021-09-17
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)