neurodata / brainlit

Method container for computational neuroscience on brains.
http://brainlit.neurodata.io/
Other
27 stars 17 forks source link

Simplify compute_bounds function #325

Open tathey1 opened 3 years ago

tathey1 commented 3 years ago

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.

github-actions[bot] commented 1 year ago

Stale issue message

github-actions[bot] commented 1 year ago

Stale issue message

Swarnlataaa commented 1 year ago

please assign the issue to me.

anviimishra commented 1 year ago

I'm interested in helping with this!

tathey1 commented 1 year ago

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.