feature(filter): Implement filtering class and method #65
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Using class inheritance from
topostats.filter.Filters()we introduceSlicingFilterclass which takes as input aTopoStatsobject and performs filtering/flattening on the image.The following methods from TopoStats are used...
Regression tests are in place that use syrupy and these have been setup as
parameterised tests so we can easily add in actual examples once we have some small files on which to base the tests.
This required a refactoring of some code because we want/need to instantiate an
AFMSlicerobject before we applyFilterto it, which takes as inputAFMSlicerchild class which inherits fromtopostats.classes.TopoStats.We can't therefore slice the image before we have done this which was the way
AFMSlicer.__post_init__()performed.With this pull request we split out setting attributes when creating the class and introduce another method that
performs the slicing of the class so that we can first filter/flatten the image.
Other things...
default_config.yamlthat are carried over fromTopoStats..pylintrc>.pylint.tomland update.pre-commit-config.yaml