Whole tissue scan help

What you save in scan time you will spend on stitching the images on a slow raspberry pi processor. Furthermore, I could not find a software solution that can stitch an asymmetrical grid.

I agree that long term being able to intelligently skip blank areas would be nice, Iā€™ve done some work tiling non-rectangular scans but itā€™s a way away from being released.

For now @dgrosen, using the frequency of colours within a field of view Iā€™ve got a basic background detect working that will only autofocus if thereā€™s more than a thin slice of sample within the FOV. Is the animation below the sort of thing youā€™re hoping for?
ezgif-1-14253ba0d994

1 Like

YES. This is amazing.

Hi,
Just an idea, some microscopes can image whole samples in a spiral going outward (instead of serpentine). I donā€™t know if this is possible here but it has the benefit of starting in the sample, where the autofocus might work, rather than outside.

Great, itā€™s a bit fiddly to set up, but should work for your samples. Could you send me some images of FOVs (ideally from the OFM) of a sample and background youā€™d like to automatically scan please? The focus isnā€™t important

Gladly. I will upload a few examples and share the link later today. Thanks.

@pristinscope The newest version of the software now has the option of a spiral scan.
(developed by @JohemianKnapsody)

2 Likes

Hi @JohemianKnapsody. I have the files ready but they are quite large to post here. I would like to share a link to my one drive folder with the files. can you please send me your email to dgrosen@bcm.edu? thanks

Amazing!!! :exclamation: :exclamation: :exclamation: What kind of witchcraft are you doing with the code?! :ghost:
It will be hard to stitch a spiral pattern, However, I think that predefining the image positions in a file on the grid collection stitching plugin in ImageJ can work.

Thanks for the images @dgrosen. Iā€™m not sure if youā€™re happy for me to post previews of them here to show what Iā€™m doing?

Just to confirm, all features in the images are considered the sample and can be focused on, except the very empty images (64, 69-72, 85-93, for example)?

tiling

Hereā€™s a preview of how my tiling code copes with ā€œspiralā€ scans, updating after each new image. Clearly itā€™s not a true spiral, more a concentric series of rectangles. Main things that need adding are a nicer way to smooth between the edges of images, and a final step once all images are taken to see if thereā€™s any small adjustments that would improve the overall tiling. Iā€™ll see how ImageJ gets on with this style of scan too

3 Likes

Yes, you can post them here to share with the OF community. Let me know if you need more examples. Thanks

I tried the snake scan and works fantastic! Is really and innovative solution Iā€™ve never seen on any scanner. The problem is 1) finding a way to stitch the images reliably and 2) focusing. I did a quick manual mosaic on ImageJ on this 2x2 grid


The rendering looks good.

I was not that successful using a 3x3 spiral grid.

This is amazing progress!!!

@dgrosen Iā€™m curious about that last stitch - it looks like thereā€™s a lot of rotation as well as translation. Has something funky happened to your stage?

Yes, it came out funny. No problem with the microscope at all. I dont have a programmatic way of stitching so I did it manually wit MosaicJ. The MosaicJ plugin in ImageJ has a funny way of stitching things. I think it was trying to stitch the white background images the best it could and came out that way.

Iā€™ve had the same problem with ImageJ, even without the issues focusing it has no way to tile the empty background. Work on your sample seems pretty positive - thereā€™ll be a calibration step, then you can set a percent of the FOV that needs to be sample (or ā€˜not-backgroundā€™) for the autofocus procedure to be run.

@r.w.bowman, I think weā€™ll need to store the z position of every image, then when returning to the top of a raster column, use the previous columnā€™s top image z. Snake scans are working without this, but raster is too unreliable.

1 Like

@JohemianKnapsody I thought raster scan did this already - but we should probably dive into the code and think about how to handle it more nicely. Of course, you can also pull it out of the captures database, but thatā€™s possibly going the long way round!

Sorry Richard, I meant it should then be able to perform that check at any point in the column. So in the image below, if it doesnā€™t autofocus at the top of column 4, then the second cell down should look at the height to the left instead of copying the height from above

image

Ah, I see - I guess we probably want to be fairly general in that case, just keep a list of XYZ coordinates that were deemed to be in focus, and then use whichever XY point is closest as a starting estimate. Might be worth storing XYZt, so you can tie-break by figuring out which was most recent as well. That has the nice property that if the last point worked, youā€™ll use the last point by default (though there will be a little bit of thought required to make sure the threshold for using time vs using XY is sensible).

1 Like

Doing that on a sample with a lot of background, this is the 10x10 scan I got

Itā€™s only focused on the areas with sample, and not lost focus elsewhere. Iā€™ll make sure itā€™s as readable as possible, then work out how to share it with @dgrosen if youā€™re both happy with it

3 Likes