kushalkolar / MESmerize

Platform for Calcium Imaging analysis. DEPRECATED.
GNU General Public License v3.0
58 stars 14 forks source link

Added support for importing different ROI types from ImageJ #64

Closed pr4deepr closed 2 years ago

pr4deepr commented 2 years ago

mesmerize wouldn't import rois if they were oval or rectangle. It only accepted polygon ROIs. If the ROI is freehand, it may take longer to import. Do let me know if the code can be improved.

kushalkolar commented 2 years ago

@pr4deepr Thanks for trying this out!

A better way to implement this functionality is to create a classmethod for ManualROI, similar to the classmethod from_positions. Perhaps call it something like from_ellipse, and then you can directly create pyqtgraph EllipseROI objects rather than rasterizing an ellipse, see here for ideas. You can then implement this from_ellipse classmethod within ManagerManual.import_from_imagej.

pr4deepr commented 2 years ago

I've updated the code as per your suggestion. Thanks I've created a from_ellipse class method within ManualROI. Apologies about the additional "ignore spectral" commit. I did that by mistake. Please ignore that one. How do I change that?

lgtm-com[bot] commented 2 years ago

This pull request introduces 1 alert when merging 152255e99237a7d9a813e36b5cae855613d39ebb into 3734d0c823011c5a18cbd801d56b09286a7b9fea - view on LGTM.com

new alerts:

kushalkolar commented 2 years ago

Most of it looks good! I've added some more comments, if you can address those and test it then I think it's good to go!

pr4deepr commented 2 years ago

Thanks @kushalkolar I can't seem to figure out where you're comments are?

kushalkolar commented 2 years ago

Go to the "Files Changed" tab and you'll see them.

pr4deepr commented 2 years ago

Sorry man, I honestly can't see any comments.. Not sure what I'm doing wrong..

image

kushalkolar commented 2 years ago

This page: https://github.com/kushalkolar/MESmerize/pull/64/files

kushalkolar commented 2 years ago

Can you restore the spectral.png to the original one? not sure why it's changed

pr4deepr commented 2 years ago

I'm not sure why spectral.png changed either. I've been working on Windows. Let me know if it isn't fixed.

In the "Files Changed" Tab, the red ones were what you marked, right? I've gone through them updated it. Let me know if you still want me to make changes..

Apologies for the mess, still figuring out how to contribute/collaborate via github. Appreciate your patience.

pr4deepr commented 2 years ago

I'm having trouble reverting things. I'll create a new pull request again if thats ok. Apologies for the mess.

pr4deepr commented 2 years ago

redoing this pull request