-
Notifications
You must be signed in to change notification settings - Fork 12
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
Refactoring and tests of dnatracing.py #183
Comments
One thing to consider is replacing the skeletonize solution that dnatracing calls with the same functionality from scikit-image skeletonize. |
Definitely agree with this. Makes it more flexible too. Unless @joe thinks
differently? It’s his initial code!
On Wed, 20 Jul 2022 at 09:54, Neil Shephard ***@***.***> wrote:
One thing to consider is replacing the skeletonize solution that
dnatracing calls with the same functionality from scikit-image skeletonize
<https://scikit-image.org/docs/stable/auto_examples/edges/plot_skeleton.html>
.
—
Reply to this email directly, view it on GitHub
<#183 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADJSFMLD4OQG2NKZUVZBQITVU65DJANCNFSM5ZB4F7TA>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
--
Dr Alice Pyne
UKRI Future Leaders Fellow & Senior Lecturer
Department of Materials Science and Engineering
University of Sheffield
Email: ***@***.***
Website: www.pyne-lab.uk
|
This is quite a big refactor and so I'm going to break it down into smaller tasks, and so will use this issue as an "Epic" and break it down into smaller tasks and list the issues below.
|
I've started work on this and am aiming to simplify a lot of the code by making the class process a single grain at a time, that removes all the complexity that is scattered around that repeats each step on multiple grains. Processing multiple grains is then simplified by iterating over a dictionary of grains which itself may contain several different sets of information such as the grain in its raw processed form (post Filters), the mask of the grain (as skeletonisation currently works on binary arrays), the original coordinates should there be a desire to reconstruct the whole image with skeletons for example. |
Belatedly adding notes from meeting 2023-01-17
As a dummy example...
...might skeletonise to...
Strictly it has skeletonised, but its neither circular nor linear and should be removed. |
Add a function to Documented in #595 and added to the todo list. |
Closing as work has been undertaken under the EPIC #800 and related issues linked from there. |
topostats.tracing.dnatracing
is the module that covers the processing after "topotracing" has processed an image viaFilters()
,Grains()
andGrainStats()
. It contains a couple of classesdnaTrace()
andtraceStats()
and some work has been done on these to align them with the new workflow (see #166).But there are no tests in place and the code can be refactored to be cleaner which in turn will allow for finder-grained tests to be written. Further docstrings need writing for all modules, classes and methods, there is some information there but not fully qualified numpy docstrings.
Many of the methods have
for:
loops in them, each of the contents of these loops should be abstracted out into its own_[method]
and that method then called from within a loop of the associated[method]
. This makes it easier to write tests on a single case.There is a lot of old code left in various comments or documentation blocks that will need cleaning out.
The text was updated successfully, but these errors were encountered: