suite2p
suite2p copied to clipboard
Can rotations be enabled for manual segmentation?
In the manual labelling mode (which is great for polishing up!) one can create circles and ovals. Although for "prototypical" cortical cells this works well, sometimes said neurons can have morphologies that are oval shaped, but not necessarily oriented in the ordinate axis. If the roi shape could be rotated one could easily fit these non-conventional morphologies.
It would be a matter of adding handles here.
self.ROI.addRotateHandle(pos: List, center: List)
This shouldn't otherwise affect the behaviour of the software.
Thanks ahead :brain:!
unfortunately it's not that easy, you also need to use the rotation to create the ROI, I tried the built in getArrayRegion function and it doesn't take angle into account, so you have to compute it by hand somehow. if you implement it please submit a pull request and I'll be happy to accept it.
if you press the Alt key when you click the ROI (outline yellow) you can rotate the ellipse with the mouse. Is this what you were looking for?
@camille-lab I'm finding that this does indeed rotate the ellipse in the manual segmentation window, but when looking at the ROI that ultimately gets saved it is not rotated correctly... is anyone seeing this issue as well? Images below


I had trouble getting that angle info out of pyqtgraph. very happy to accept a pull request on this though if someone wants to dig into the code, but do not plan on adding this myself since it doesn't seem straightforward sorry :(
I'm trying to develop this feature for my lab but want to check if the ROI is a QWidget as it seems unfeasible if it is (https://stackoverflow.com/questions/58020983/rotate-the-widget-for-some-degree.
If not, I'll try to build an angle system for it
Could you please let me know if this just an issue with how the rotated ROIs are displayed after the fluorescence traces are extracted? Or can the fluorescence traces actually not be extracted correctly for rotated ROIs?
duplicate of #807