https://github.com/ChrisRaven/Neuroglancer-Slice-Shifter/raw/refs/heads/main/Slice-shifter.user.js
A small script that might be helpful with misalignments.
I did it in cooperation with Gemini 2.5 Pro. And by cooperation I mean, that I gave the LLM instructions and it did, what I wanted. Then I took the code, tested it, debugged, gave the information back, rinse and repeat until it worked, then we were switching to a next functionality, etc.
Hereās how it looks:
You can grab it by the header and move where you want. You can also click that small underscore symbol in the top left corner to minimize/restore it. Both the position and the state will be remembered between sessions and instances of Neuroglancer.
It works for https://spelunker.cave-explorer.org/ , https://ngl.brain-wire.org/ and https://play.eyewire.ai/ .
The idea is simple:
- When you reach a misaligned slice, you click the āGet Zā button to get the slice number to the tool. You can also add it manually. You can add manually more than one slice, even non-consequential ones,
- Then you can reposition the misaligned slice using either the sliders (range from -100 to 100px for both) or by manually typing the offsets,
- When youāre going to add on a segment on a misaligned slice, the highlighted subvoxels will differ from the normal ones for that segment, but when you add the segment, the correct one will be added (the one under the cursor),
- When youāre done with solving the misalignment just click the Reset button to remove the offset and the selected slice number.
Moving the 2D moves also the 3D since they are both drawn on the same canvas, but I didnāt find it problematic enough to search for a solution.
At one point Iāve stumbled at a bug, where after selecting a segment, the misaligned slice moved back to itās position and the whole stack moved by the same offsets by in the opposite directions. I had to refresh the page to fix it. I wasnāt able to reproduce it, so I couldnāt potentially fix it.