neuroanatomy / thresholdmann

A tool to apply a smoothly varying threshold to a nifti image
https://neuroanatomy.github.io/thresholdmann/index.html
ISC License
3 stars 2 forks source link

[joss][question] Size of $\epsilon$ term? #22

Closed sneakers-the-rat closed 5 months ago

sneakers-the-rat commented 6 months ago

Part of: https://github.com/openjournals/joss-reviews/issues/6336

The text reads

where $\epsilon$ is a small number used to prevent a division by 0 at the exact position of control points.

I see the $\epsilon$ term is set as 0.001 here: https://github.com/neuroanatomy/thresholdmann/blob/25090ab07c7e51b4122f1ffb0997e8720d6b1daf/thresholdmann-worker.js#L29

Is that always a trivially small value, or is there some scale (that's reasonably likely in real data) where that might be a problem? I guess i am not quite clear on the units of the space to know. it seems like it's in voxel index space?

just posing as a question, y'all are the experts on brains of all sizes, and whether there might be some tiny hydra neuron edge case to worry about :)

katjaq commented 5 months ago

Thank you for pointing this out.

It is indeed in voxel space, and with current MRI data, we would not expect this to become a problem. It does change the exact space at which a control point faints out, but in practice, the amount of voxels in an MRI even if it were smaller or bigger, is usually about 300. We also tested with high resolution data of small brains (for example a mouse: dim: 420 x 548 x 282, pixdim: 0.03 x 0.03 x 0.03) and also with a big dolphin brain (dim: 461 x 424 x 304, pixdim: 0.30 x 0.30 x 0.30) and the behaviour of the tool doesn't perceivably change.

But we could change it in future if we realise that it becomes a problem, so that a user could select a value.

sneakers-the-rat commented 5 months ago

Question answered :) feel free to close or document, up 2 u

katjaq commented 5 months ago

documented! In commit a061d22 Thank you again :)