-
Notifications
You must be signed in to change notification settings - Fork 54
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
Adds isolation in 2d to segmentation file. #76
base: dev
Are you sure you want to change the base?
Conversation
It looks like the CI failed due to switching between spacing and tabs for indents. I believe that the rest of the code uses four spaces to denote indentation rather than tabs. Looking at your code, I suspect that that may be the only issue? |
Updated for spacing errors
@@ -25,13 +25,15 @@ def segmentation_timestep(field_in,features_in,dxy,threshold=3e-3,target='maximu | |||
method: string | |||
flag determining the algorithm to use (currently watershedding implemented) | |||
max_distance: float | |||
maximum distance from a marker allowed to be classified as belonging to that cell | |||
maximum distance from a marker allowed to be classified as belonging to that cell | |||
ISO_dilate: int |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is 8 the default here? I'm not opposed to the value, I'm just curious.
@@ -120,6 +123,33 @@ def segmentation_timestep(field_in,features_in,dxy,threshold=3e-3,target='maximu | |||
else: | |||
raise ValueError('unknown method, must be watershed') | |||
|
|||
#create isolation, currently only available for 2d tracking | |||
if field_in.ndim==2: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to make this entirely optional? Is running the isolation here necessary for everyone, or would it be better to have a parameter in place to turn it on/off?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess the question here ultimately is: what's the performance penalty?
I've added some comments to the code, but generally I'm happy here. I think we will want to wait to merge this until after #78 , but once that's in and this is updated to match the new style, I'm happy to merge this. |
Overall this looks good, but I have a couple of thoughts/requests:
The merge conflict is just due to formatting, so we can fix that easily before merging. |
Merge/split as postprocessing step.
This reverts commit d4cbfa2.
I've marked this PR as a draft for now. |
This is just an addition to the main tobac segmentation file. The additional parameter is ISO_dilate, a value by which the 2d feature is dilated in order to find the number of neighbors. 1 Neighbor value indicates the feature (which was dilated) does not have a neighbor. Values greater than 1 are the number of neighbors in addition to the base feature. Non-positive values indicate a feature area was not created for the feature id and thus no valid neighbors.