scexao-org / camstack

EDT cam stack - python + minimal imgtake.c
5 stars 2 forks source link

[☢️DONT MERGE] Add crosshair hook to generic viewers #7

Closed mileslucas closed 1 year ago

mileslucas commented 1 year ago

As title says, adds a crosshair centered on the crop center.

Here's a screenshot of it working Screen Shot 2023-03-22 at 20 17 41

☢️ Don't Merge until this is addressed:

Note, this doesn't seem to work with different binning, so my calculation here is botched, please advise.

I'm mostly just trying to get a feel for this pygame stuff, hopefully I've got things in the right places. I would like to add more of the generic features, like the centroid bullseye and other features that look easy to set up.

DasVinch commented 1 year ago

Yes and yes, my initial intent was to build a plugin suite that could bind into the GenericViewerFrontend and GenericViewerBackend and subclasses thereof. Hasn't seen the light of day just yet. I'm preparing a notional template, I'll post here.

Subclasses of the GenericViewerFrontend would define a list of plugins. Plugin would then crossref the frontend and backend (which should really be called the frontfrontend and backfrontend, but you get it). And eventually, the update loop of the backend would call the appropriate backendrefresh method of all of its plugins, and same for the frontend. I trying really hard to avoid the spaghettification, but unfortunately I think that's gonna be hard for plugins that have a callback in a frontend textbox or something like that...

DasVinch commented 1 year ago

Sample commit is coming...

Here is a list I made a long while ago of what Plugins can be, by general classes.

ComplexPlugin:

Data-related-plugins

RenderPlugins

Overlay on-off modes

All modes should have overlay capability somehow.

SingleShotPlugins (synced / interrupting) action

DasVinch commented 1 year ago

@mileslucas please go check out ddf17be7eb98e88db3c55c7fe891c05b4f129bc1. Architecting go brrrr.

mileslucas commented 1 year ago

Gorgeous gorgeous engineering. Thank you 🙏🏻

DasVinch commented 1 year ago

Oh there's more where this came from... I'm not 100% happy but I think this is a sensible starter pack. See 410bc263c81cad31ed46023d68fa712dcabc3720. I'm getting close to rewriting all of pueocam in this new framework. Which is really the smaller stepping stone. But a few key things are somewhat still missing.

Including the logging stack. And what we were discussing earlier, with a conf folder and a dark frame storage yard for all the modes/crops/exptimes.

To be continued.