Skip to content
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

Kymograph of a rectangle ROI #48

Open
biswajitSM opened this issue Apr 26, 2019 · 2 comments
Open

Kymograph of a rectangle ROI #48

biswajitSM opened this issue Apr 26, 2019 · 2 comments

Comments

@biswajitSM
Copy link

Hi,
Is it possible to get the kymograph from a rectangle selection? I can only get kymograph for a line. It would be nice if the pixels on one side could be averaged and then plot kymograph.

Thanks
Biswajit

@kyleellefsen
Copy link
Member

Yes, it should be possible. In flika/roi.py, the ROI_line class has all the kymograph related functions. It should be pretty straightforward to copy those functions to the ROI_rectangle class located in the same file. The code that would need to be changed in the transfer is the averaging, and the ability to select whether the kymograph is an x_kymograph and y_kymograph.

A more elegant solution might be to have a setting when creating the kymograph from the ROI_line that specifies the width to average, with the default being 1 pixel. This could be a dialog box that pops up after you make the selection for 'Kymograph', or it could be a setting of the line itself, set by right clicking the line icon in the main window. If it's a dialog box it won't be hidden from the user, but it might get annoying to select the width every time.

I probably won't implement this, but if you want to discuss it and submit a pull request I'd be happy to include it.

@biswajitSM
Copy link
Author

Thanks for the suggestions and ideas to implement this. It's taking time for me to get used to the PyQt syntaxes. but I like the second option where you could simply change the thickness. it can also allow to use any orientation. I will try to implement it and send a pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants