Commit graph

2915 commits

Author SHA1 Message Date
Richard Bowman
42b4c1246e Merge branch 'v3-update-labthings' into 'v3'
Migrate to new Blob type and update imports

See merge request openflexure/openflexure-microscope-server!191
2024-11-29 09:04:44 +00:00
Richard Bowman
1ba799de22 Migrate to new Blob type and update imports
This now uses the latest version of labthings-fastapi.
2024-11-28 17:35:56 +00:00
Richard Bowman
aa42e93154 Correct command in README 2024-11-28 11:14:27 +00:00
Richard Bowman
6f761b0b81 Merge branch 'v3-configurable-server' into 'v3'
Add configurability to the server

See merge request openflexure/openflexure-microscope-server!181
2024-11-28 10:45:35 +00:00
Richard Bowman
78edb078b5 Update readme with instructions on how to run the server. 2024-11-28 10:37:46 +00:00
Richard Bowman
b8ca12314c Lock labthings/picamera2 deps
v0.0.7 of labthings includes breaking changes, we're not ready for that yet.
2024-11-28 10:30:53 +00:00
Richard Bowman
5c4ff203d7 Fix full config file
The full config file now uses the correct syntax for loading the picamera2
and sangaboard Things, and uses the default system-level settings folder.
2024-11-28 10:26:56 +00:00
Richard Bowman
7b584d3e64 Add labthings version constraint 2024-11-16 10:58:31 +00:00
Richard Bowman
e17d6e5e8f Update README and correct syntax of full config 2024-11-16 10:56:10 +00:00
Richard Bowman
868aa0598c Simulation mode
I successfully calibrated and used the camera-stage mapping.
2024-11-02 00:10:25 +00:00
Richard Bowman
2019234ad1 Close OpenCV camera cleanly 2024-08-09 02:50:39 +01:00
Richard Bowman
7fb4417ebe Configuration files and other tweaks
The OFM server can now be run in "stub" mode on
my development machine, using an OpenCV
camera feed.
2024-08-09 02:42:32 +01:00
Richard Bowman
2268425bf3 Depend only on generic Camera and Stage
I've now defined parent classes for camera and stage, and depend only on those. This allows
proper typing while enabling the actual hardware
classes to be swapped.

The interfaces definitely aren't final - this is a first
draft, largely to enable me to test out the concept
of a configuration server.
2024-08-09 02:41:39 +01:00
Richard Bowman
aa49cfcba3 Search the package for static files
This isn't foolproof: a zipped package will break it.
If that's something we want to support, we might
need to extract the folder to a temp location.
2024-08-09 02:39:04 +01:00
Richard Bowman
e3e248c46e Move server config to a config file
Currently this is "just" a LabThings config file.
2024-08-09 01:51:11 +01:00
Richard Bowman
b7f9f6cbaf Fix import from LabThings 2024-08-09 01:50:46 +01:00
Richard Bowman
5279dffe6a Dummy stage class 2024-08-09 01:12:16 +01:00
Richard Bowman
3f92ed8266 Add a stub OpenCV-based camera
This allows the server to run on a laptop, to some extent. I've not tested if this will make the whole
web app work properly.

As StreamingPiCamera2 is hardcoded in various places, this certainly doesn't make cameras totally
interchangeable - but it is a step towards that.
2024-08-09 00:52:31 +01:00
Richard Bowman
c32b44d1a6 Refactor server into submodule 2024-08-09 00:49:24 +01:00
Richard Bowman
3abddc3b39 Fix labthings dependency
I changed the labthings package such that it will
only install the client dependencies by default.
This is now fixed by requiring the [server] extras.
In the future we might split labthings into client
and server packages.
2024-07-18 13:17:26 +01:00
Joe Knapper
c2b54da4a1 More explantion of building webapp in README 2024-06-10 11:27:30 +00:00
Joe Knapper
4ea3b5b623 Increase minimum fraction coverage - makes stitching much more reliable 2024-05-30 11:42:25 +00:00
Richard Bowman
c9aeabf545 Await updatePosition in mounted hook
updatePosition is asynchronous, so we should await it, otherwise
it may not be run correctly (resulting in the navigate pane
being disabled).
2024-03-12 17:19:11 +00:00
jaknapper
f08840f0e8 Zip a stitched image with the scan name in the filename 2024-03-05 13:38:24 +00:00
Richard Bowman
61d94e205d Merge branch 'action-button' into 'v3'
Replace tasksubmitter with action-button

See merge request openflexure/openflexure-microscope-server!176
2024-02-29 22:54:16 +00:00
Richard Bowman
2ac317307e Clean up debugging code 2024-02-29 22:41:45 +00:00
Richard Bowman
fef53c1176 Start modals on mount, not create
The calibration modal was not starting properly, because
the component was not mounted when its show method
was called. Calling it from the `mounted` method solves
the problem and we don't get the error.

I'm not 100% sure this was introduced by refactoring the
taskSubmitter, though it's possible. However, I think the
fix is uncontroversial and it should probably have been there
all along.
2024-02-29 22:40:41 +00:00
Richard Bowman
fb07343cdd Fix errors introduced by refactoring of taskSubmitter
I removed some defunct properties - this introduced a couple
of problems, which are resolved by:

* no longer checking for fastAutofocusUri
* removing the unused prop availablePlugins from the calibration modal
2024-02-29 22:17:49 +00:00
Richard Bowman
cbd8b090ec Replace tasksubmitter with action-button
I've changed tasksubmitter to accept a "thing" and "action" rather than a single URL. This seems more in keeping with
propertyControl, and eliminates the need for loads of
computed properties.

I've also deleted (rather than just commenting out) chunks of the web app that are no longer in use. These may be
reinstated in the future - but we can get them from git
history. It's less confusing not to have vestigial
code in the repo.

This builds OK but is not, as yet, tested with hardware.
2024-02-29 21:44:39 +00:00
Richard Bowman
612b88d58c Merge branch 'verify-focus' into 'v3'
Improvements to autofocus and stitching in `smart_scan`.

See merge request openflexure/openflexure-microscope-server!175
2024-02-21 20:51:09 +00:00
Joe Knapper
f2cfa9faf8 Working delete all and auto reload when deleting or opening tab 2024-02-21 17:45:39 +00:00
Joe Knapper
361130eea6 Download zip button from scan tab 2024-02-21 16:36:17 +00:00
Joe Knapper
07b1d3bb7c Merge branch 'verify-focus' of https://gitlab.com/openflexure/openflexure-microscope-server into verify-focus 2024-02-21 15:48:04 +00:00
Joe Knapper
97c114b77e Show scan folder instead of name 2024-02-21 15:47:42 +00:00
jaknapper
43cf7e837a Produce tiff as property 2024-02-21 14:42:52 +00:00
jaknapper
169df15fd1 More restricted range 2024-02-21 14:04:07 +00:00
Joe Knapper
6031280a19 Merge branch 'changes-into-saturation-fix' into verify-focus 2024-02-20 14:17:25 +00:00
Joe Knapper
eafeaca3ff Readd zip name 2024-02-20 12:22:06 +00:00
Joe Knapper
bba0ab1853 Revert "Readd zip name generation"
This reverts commit c3742565b6
2024-02-20 12:21:21 +00:00
Joe Knapper
c3742565b6 Readd zip name generation 2024-02-20 12:15:42 +00:00
Joe Knapper
2c8660e01f Capture metadata before image to ensure consistency 2024-02-20 12:11:04 +00:00
jaknapper
e6eb4d419d Live logging (requires unbuffered program output from stitching) 2024-02-20 10:51:32 +00:00
Richard Bowman
41f03958c6 Save images with saturated pixels
If any pixels in the manually processed raw image end up
saturated (>255), this causes an error. I've now manually
clamped the values between 0 and 255 to fix this.

It would probably be a good idea to warn when this happens,
as it does mean we're losing data.
2024-02-15 17:34:29 +00:00
Richard Bowman
08e74ac020 Merge branch 'parallel_acquisition_and_moves' into 'v3'
Parallel acquisition and moves

See merge request openflexure/openflexure-microscope-server!174
2024-02-15 16:56:00 +00:00
Richard Bowman
82e2a250fc Include colour correction matrix and gamma in saved images
I've replicated more of the camera pipeline in the images
saved during scans - in particular, I've added the colour
correction matrix (increases saturation) and the contrast
agorithm (implements gamma correction).

This slows down saving to ~0.5-2 seconds, but that's still less time than it takes to move.
2024-02-15 16:38:15 +00:00
jaknapper
aed5a22983 Autofocus verify based on sharpness range, removed repetitive logging 2024-02-15 11:02:44 +00:00
Richard Bowman
a16c54d2db Update raw image processing in scan
This matches recent commits in labthings-picamera2
2024-02-14 18:03:13 +00:00
Joe Knapper
f1c315783c Test the success of refocusing 2024-02-13 15:24:42 +00:00
Joe Knapper
f2d85cb891 sleep before capturing 2024-02-09 19:06:58 +00:00
Joe Knapper
61d7712c27 tiff as an option 2024-02-09 19:05:20 +00:00