[addon] Utilities

thank you very much! (20 chars… lol)

1 Like

v. 0.12.1

Phew! Hopefully fixed all the errors. Can’t guarantee though, because I didn’t have time to test it thoroughly. I have to go to sleep now and tomorrow I’ll be AFK for most of the day, so any further fixes (if necessary) will be done either tomorrow evening (european time) or the day after tomorrow.

2 Likes

idk what else was fixed, but jumping to segment from rendering panel is fixed! thnx.

2 Likes

yw. There was a problem in the Dock, with returning correct coords. Fixing it helped with the issue. Also fixed the thing, that selected neuropils weren’t showed (everything was showed, no matter the settings in the options).
I’ve also rebuilt the whole code behind saving and restoring options. It made everything clearer (from the programmer’s point of view) and easier to further extensions.

2 Likes

a number of segments selected/visible?

2 Likes

Should be doable.
For now a one-liner in console (F12):

viewer.saver.pull().state.layers[1].segments.length

to count all the segments.
Works if the graph layer is second from the left (which it usually is).

2 Likes

nice, thanks!

1 Like

Just checked. It actually counts only visible segments. If you want to count hidden ones change “segments” to “hiddenSegments”, or to count all segments:

viewer.saver.pull().state.layers[1].segments.length + viewer.saver.pull().state.layers[1].hiddenSegments.length

2 Likes

v. 0.12.2

Added first version of a feature, that allows you to change segment’s ID to a meaningful name.
There are many caveats, some will gone in the future, others will stay.

  1. It works only locally (and it probably will in the future)
  2. It doesn’t stay after refresh (will be fixed)
  3. It doesn’t stay after merging/splitting (will be probably fixed).
  4. Probably more.

The way it works, is that you should Ctrl + right-click on any segment’s ID in the right panel. A dialog window should open. There will be the current name of the cell and you can change the name to anything you want. Click “Save” to save the changes.

Feature might be useful when analyzing some more complicated structures.

7 Likes

niiiiiiice! I can see this being useful.

4 Likes

this is awesome!! So are all the other updates! Love the neuropil one too.

2 Likes

v. 0.12.4

Fixed the problem, that when you tried to change name of a segment, it would display the correct popup, but in the background it would also jump to that segment. Now the jumping shouldn’t happen.

1 Like

i think this should be in names addon? lol Wont let me update the script, says reinstall.

Nope, the problem was here. The jump to segment feature didn’t check if the Ctrl button was being pressed, so it jumped whenever the right-click on a segment happened. Now it jumps only, when the button isn’t pressed.
I don’t know, why it asked for reinstall instead of update. Altough there were some tests on GitHub that failed for some reason (now they are ok), but I don’t know, what those tests do. Anyway, I think, it should work correctly now.

1 Like

Hey KK, we shared this addon with a scientist today after she mentioned the troubles of how segIDs reorder and recolor after edits/refresh. She loved the idea of making a 3D seg visible from the list and asked if there was an option for the other way around - say, from 3D right click to see segID or to reveal the segID? She is working on lineages (determining cell types) and typically would have ~50 cells visible and will go through a list toggling them on and off to see which ones are a fit and which should be removed. As you can imagine that gets confusing!

3 Likes

ive been meaning to ask for this for the longest time too! itd be great if i could say right click on 2D (or 3D) on a seg and the segment selector would auto-scroll up/down and highlight that segment in there.

2 Likes

I think, that should be doable. After all, when we hover over a segment in 2D or 3D, we can see its ID on the tab at the top. And I can have an ID, I can find the corresponding button in the right-panel list.

2 Likes

v 0.13

That was easier, than I thought.
I have to use ctrl + right-click though, because right-click alone is already taken and repositions the axis/2D view at the clicked point.
So, if you ctrl+right-click on any segment in 2D or 3D the button in the right panel corresponding to that segment will be scrolled into view (as close to top border of the list as possible). Additionally, the whole row will be surrouned with a 2px width solid orange border. Clicking on another segment will move the border to the corresponding row.
For now, the selected segment isn’t saved anywhere, so after refreshing, the marking will disappear. Not sure, if that would be problem or no.

4 Likes

v 0.14

Added a counter showing number of visible segments and number of all segments (thanks @Nseraf for the idea!).

The counter is visible to the right of the “add segment” field. The first number shows the number of visible segments and the second one (in parentheses) - number of all the segments.

You can, as usual, turn the option on or off in the Options dialog. It should be on by default.

3 Likes

Screenshot 2022-09-07 000559
Updated, refreshed, and i dont see it?

1 Like