Open jhlegarreta opened 5 years ago
Hello @jhlegarreta! Thanks for the detailed input.
Tract-math has been thought as a command-line, following after fslmath, tool and not as an API to perform python scripting hence the write-to-disk behaviour. I think that changing this will require an in-depth refactoring which is not priority with our given resources now.
I've been thinking on using click for a refactoring that would agree with what you are saying but our priority now is on improving the language core.
Pull requests are more than welcomed though, and I will be happy to work with you on it.
@demianw I see. Improving the language core will also be welcome by users :100: !
As time permits I'd love to contribute to tract_querier
. I am running into a heavy workload, but at some point I'd like to give a go at some aspects that allow for improvement in this nice endeavor !
Description
tract_querier
offers tools to perform streamline filtering. However, their behavior may offer room for improvement (if I am not missing anything).If I am not mistaken
tract_querier
'stract_math
tools require their output to be written to disk. I'd dare to say it may be worthwhile exploring the possibility of returning the filtered tractogram instead of writing it to disk.Expected behavior
Using the
tract_remove_short_tracts
operation oftract_querier
'stract_math
tools like:This seems to require a filename so that the filtered tractogram is written to disk. Then users would be reading it back with
I would have expected the
tract_math
tools to return a tractogram so that a file I/O operation is avoided.Actual behavior
Using the
tract_math
tools requires writing/reading the files to/from disk.Steps to Reproduce
Use any input tractogram and filter streamlines less than a given length using the
tract_math
. Thetract_querier/scripts/tract_querier
could be used, modifying it to callReproducibility
%100
Versions
master
Environment
Ubuntu 16.04 LTS, Python 3.6.5
Additional Information
Related to #46: to circumvent "single-point streamlines" one could think of using
tract_querier
'stract_math
tract_remove_short_tracts
operation.