Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Non-collision auto-tracing [Feature Request] #11

Open
oanegros opened this issue Jan 8, 2025 · 2 comments
Open

Non-collision auto-tracing [Feature Request] #11

oanegros opened this issue Jan 8, 2025 · 2 comments

Comments

@oanegros
Copy link

oanegros commented Jan 8, 2025

Hi,

Could there be a possibility for a one-click and semi-auto tracing preference setting which disallows entering a previously traced region (or x µm tube around previously traced regions)?
This would be very useful for our use case where we have non-overlapping traces that can look adjacent, especially for time-tracing and other un- or less supervised bigtrace applications.

Thanks!

@ekatrukha
Copy link
Owner

Hello Oane,

it would be a very nice feature indeed, I thought about it.

Practically, during tracing, BT would need to check some kind of data structure during tracing for the "already traced" space.
At the moment, it is just a center line of the current trace.

I am still thinking about what kind of structure should be used.

One option is just some 1-bit mask with the same dimensions as the volume data.
It will probably occupy a lot of memory (dataset size/16^3?, hmmm, maybe not).
In this case, it needs to be updated/recalculated at every a time point is changed and re-built from a scratch when any ROI thickness is changed by user.
For this it would be needed to voxelize ROI shapes during this re-build, which can take some time.

Another option would be some kind of smart k-d tree. It would be probably less on memory footprint, but slower, since computations. And pain to work with, not trivial to implement (for me).

Or any of them will work fast enough and all those worries are for nothing.

If you have any other thoughts, please share.

But in any case, to work on it, I would need some special occasion
or "free time" window of 3-5 days that in not on the horizon
of the coming 2-3 months. Maybe some hackathon.
Right now other projects are burning, so I do not give any promises :)
But let's keep the issue open.

Cheers,
Eugene

@oanegros
Copy link
Author

Hi Eugene,

I think it may work to rasterize and dilate (which should be possible in one pass) all traces in the trace box on load and keep this in memory as a mask. (This could be 1-bit but it might be easier and more extendable with a higher bitdepth?)
This could then be easily added onto with new traces coming in, and only recomputed for moving the trace box into previously traced areas, or changing fiber size.
Here the complexity would probably be in managing the trace box and updating only the required sections, i think. Would this work for you?

One question is i think also on whether this only provides a soft cost in the energy landscape, which you could also have this as e.g. gaussian from the center spline, or whether to apply a hard constraint on the path-finding.

Cheers,
Oane

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants