brainlit icon indicating copy to clipboard operation
brainlit copied to clipboard

Simplify compute_bounds function

Open tathey1 opened this issue 3 years ago • 5 comments

There is a function that, given a component in a segmentation, computes the bounding box with a certain padding (here). However this can be simplified by utilizing the regionprops method in skimage.

I could see the mpnp constructor computing regionprops on the labels then saving this as a state variable. Then, compute_bounds could use the 'bbox' field in the region props to compute the padded bounds.

tathey1 avatar Nov 03 '21 20:11 tathey1

Stale issue message

github-actions[bot] avatar Feb 06 '23 19:02 github-actions[bot]

Stale issue message

github-actions[bot] avatar Apr 16 '23 19:04 github-actions[bot]

please assign the issue to me.

Swarnlataaa avatar May 29 '23 16:05 Swarnlataaa

I'm interested in helping with this!

anviimishra avatar Sep 07 '23 12:09 anviimishra

Things have updated since I posted this so the function in question is here now. It would be good to sketch out (like on paper) what the change would involve. i.e. is there going to be a new class attribute/variable? If so when will it be initialized? Maybe we should set up a timing benchmark experiment to make sure that any changes would actually be faster because that's the number one priority at this point.

tathey1 avatar Sep 07 '23 14:09 tathey1