I am trying to build an viewer based on OpenLayers to view microscope images with overlays.
The images are > 50000 px x 50000 px and show a region of ~ 100 mm x 100 mm. In addition to the images, I have shapefiles with vector data I want to use as overlays.
So far I managed to convert the images to XYZ images stacks with pyvips and load the images in OpenLayers. I also have converted the shapefiles with geopandas to GeoJSON files and can use them to overlay the microscope image.
However, I was not able to define such a projection with proj4js for the map or the GeoJSON file to fit them both together.
I already calculated the affine transformation matrix for the images to overlay the shapefile vector data based on the pixel value and coordinates in mm.
Is it possible to use no projection at all and just use pixel coordinates?
Or to define a projection based on an affine transformation matrix?
Schematic microscope image example
Schematic vector data
Schematic transformed microscope image with vector data overlay