DIY fluorescent microscopy-slide scanner

Have questions about the equipment used for macro- or micro- photography? Post those questions in this forum.

Moderators: rjlittlefield, ChrisR, Chris S., Pau

Panteren
Posts: 4
Joined: Wed Feb 15, 2012 7:34 pm
Location: Copenhagen

DIY fluorescent microscopy-slide scanner

Post by Panteren »

Hello everybody

I am new to macrophotography but I have used a microscope and microscopy slide-scanners before.

I am writing my master's thesis in biomedical engineering at the moment, and one of the objectives is to determine the perfusion-the flow of blood-to different types of brain tissues in animals. To do that, you inject the animal with fluorescent microspheres. They have a size of about 15 microns. That means they get stuck in the capillaries. Afterwards you look at a tissue sample on a microscopy slide and count the number of spheres stuck, compare it to a reference blood sample and calculate the flow of blood to the area. The goal is to validate a new scanning method for newborn children suffering from hypoxia during birth, and hopefully be able to catch brain damage on a very early stage – but that is still some years ahead.

The problem is to count the number of spheres. So far I have borrowed a confocal laser slide scanner. I get a picture of the entire slide and can use a simple algorithm to count the spheres. It works very well except being a bit slow ca. 10 minutes per slide, it is in use all the time, insanely expensive (about 100.000$) and most important: I can’t use it anymore.

Well, why don’t I build a scanner myself I thought. A resolution of 10-15 microns is all I need and that should be achievable with a DSLR and a 1:1 macro lens. I could image a whole slide 25mmx50mm microscopy slide with just two pictures! I have already found the narrow band LEDs for the excitation of the microspheres and the 25 mm optical bandpass filters that will filter out the excitation light while letting the emission light pass.

Here is where I could really need your help! The optical filters are intended for collimated input and I do not know of any macro lens system that provides this and allows for a 25mm filter. I am on a quite tight budget but if I can point to a system and explain why it will work I could probably get the money for it.

In short: Can anyone think of a macro lens arrangement that allows for the use of a collimated 25 mm optical filter while still retaining a FOV of 25 mm at the shortest side and a resolution of around 10-15 microns using a standard 16 megapixels camera? I can live with a smaller FOV as long as the collimation works. Is there something I have overlooked or do you think it is possible to do? :?

Any help would be greatly appreciated :D

Anders

rjlittlefield
Site Admin
Posts: 23561
Joined: Tue Aug 01, 2006 8:34 am
Location: Richland, Washington State, USA
Contact:

Post by rjlittlefield »

Anders, welcome aboard!

As I understand your requirement, you need any of the excitation light that might get to the camera to have gone perpendicular through the filter, or as close to perpendicular as possible.

In this case, it seems like you should illuminate from the front, so the excitation light does not shine into the camera at all except for whatever bounces off the subject. But I will assume there is still enough of that to cause problems.

Here is a conceptual sketch of a "telecentric" lens system that will do most of what you want. The limitation is that it will only cover 25 mm diameter, not 25 mm on the short side.

Image

The key component is to add a collimating lens, relatively low power, close to the subject. The strength of the collimating lens should be as described HERE, equal to the distance between itself and the "entrance pupil" of the ordinary macro lens. In the case as diagrammed, the "ordinary macro lens" is specified as 100 mm, focused at 1:1 and therefore about 200 mm away from the subject, while the collimating lens is 180 mm, positioned exactly 180 mm away from the entrance pupil of the macro lens.

The point of the collimating lens is to make the cones of light that are accepted by the macro lens be perpendicular to the filter. It is not possible to make all the light rays be perfectly perpendicular to the filter, because in that case your resolution would be awful. (None at all, in fact.) But this arrangement will get you as close to perpendicular as possible.

Here is a closer view of the area around the filter with the collimating lens in place. (In this picture the lens looks negative. That is a feature of the WinLens3D package that I used to make the diagram. It sketches a positive "thin lens" looking as if were negative. In practice, the lens will actually be a pretty thick positive achromat -- thicker in the middle.)

Image

If the collimating lens is replaced by a flat piece of glass (or simply removed), then the closer view looks like this.

Image

Compare the angles as the rays go through the filter in the two cases. The collimator makes the cones be perpendicular to the filter.

In practice, the cones might be perpendicular enough if you simply use a long focal length macro lens, and leave out the collimator. In that case you could put the filter up next to the lens and cover as large an area as you want. The manufacturer or seller of the filters may be able to tell you how sensitive the combination will be to non-perpendicular angles. It depends on the exact wavelengths involved in the LED emission and the bandpass filters.

I hope this helps -- interesting project!

--Rik

Chris S.
Site Admin
Posts: 4042
Joined: Sun Apr 05, 2009 9:55 pm
Location: Ohio, USA

Re: DIY fluorescent microscopy-slide scanner

Post by Chris S. »

Anders, welcome indeed! Your project is fun to think about--designing an inexpensive setup to do the work of a $100K system.

Would you mind telling us the excitation and emissions wavelengths for your microspheres? Also, which of the several filter types you are looking at? Different sorts appear to have varying tolerances to collimation.

As Rik said, it would be useful to speak with the engineers at the filter supplier to find out how perfect the collimation needs to be. It might turn out that the light need only be roughly collimated for your purposes.

In your situation, I'd prefer to purchase fault-tolerant components, test them with simple setups, and improve only as needed to do the work at hand. But it sounds as if you need to propose a likely-to-work system in advance and avoid asking for funds to enhance it? So sadly "real-world."

May I propose a couple of stupid ideas, and feel no shame when taught why they are stupid?

1) Instead of a standard macro lens, how about a bellows lens designed to work at 1x magnification (such as a Spiratone)? This should provide some working space between lens and camera. Then, in this working space, place the filter? Seems to me that light, having passed through the lens, would be decently colimated.

2) Or if both excitation and emissions lighting need be collimated, how about placing a simple beamsplitter in this space for axial illumination? The illuminating light could be roughly collimated pretty easily before hitting the beamsplitter, and might be further collimated by the bellows lens. The returning light would also be collimated by the bellows lens, and the filter could be placed between beam splitter and camera.

Just ideas, and probably not very good ones.

Cheers!

--Chris

rjlittlefield
Site Admin
Posts: 23561
Joined: Tue Aug 01, 2006 8:34 am
Location: Richland, Washington State, USA
Contact:

Re: DIY fluorescent microscopy-slide scanner

Post by rjlittlefield »

Chris S. wrote:Instead of a standard macro lens, how about a bellows lens designed to work at 1x magnification (such as a Spiratone)? This should provide some working space between lens and camera. Then, in this working space, place the filter? Seems to me that light, having passed through the lens, would be decently colimated.
No, at 1:1 in that setup the paths of the light rays will be symmetric on both sides of the lens. If they are angled too much with the filter in front, they will still be angled too much with the filter in back. In the telecentric system, the purpose of that front achromat is to reorient the cones so that they run straight along the optical axis on the subject side, while still being angled as usual in the rest of the system.

It would be possible to essentially reverse the optics left to right, so the light would pass from subject through the ordinary lens, the added collimator, the filter, then hit the camera sensor. In that case it would be possible to cover almost a 25 mm diameter on the sensor, regardless of how large the field was at the subject. So, by setting up for somewhat less than 1:1 magnification, it would be possible to capture a field of 25 mm on the short side. In theory there are no great problems making this work, but I'm not sure about the details of the mechanics.

One thing we need to be careful about is what's meant by the term "collimated".

As it applies to these filters, my understanding is that "collimated" refers to the angle at which any ray hits the filter. That is, the filter may have almost zero transmission for a particular wavelength when the ray strikes perpendicular to the filter, but considerably higher transmission for the same wavelength when it strikes at a different angle. This is typical for interference filters, because the path length spacing between layers becomes larger at greater angles from the perpendicular.

In contrast, sometimes we use "collimated" to mean that all rays belonging to a single point on the subject are parallel, as in the output of an infinity objective on a microscope. But in that case rays from a point on the periphery of the field will still be at relatively steep angles with respect to the optical axis, even though they are parallel to each other. That arrangement is not so good from the standpoint of these bandpass filters, so triggering on just the term "collimated" can be misleading.

--Rik

g4lab
Posts: 1437
Joined: Fri May 23, 2008 11:07 am

Post by g4lab »


rjlittlefield
Site Admin
Posts: 23561
Joined: Tue Aug 01, 2006 8:34 am
Location: Richland, Washington State, USA
Contact:

Post by rjlittlefield »

Gene, thanks for the links to the Photometrics XT2 adapter, and for the offline discussion. That's an interesting and no doubt helpful piece of equipment.

As discussed, I do find myself annoyed by one misleading aspect of the sales literature. For the benefit of others, let me explain...

With some red annotation added, here's the key diagram that describes what the XT2 does (as described by http://www.photometrics.com/products/datasheets/XT2.pdf).

Image

Of course this is a conceptual sketch; the real lenses are much fancier. But basically the beast consists of two lenses spaced properly so as to copy an input image plane on one end of the adapter to an output image plane on the other end.

The key point is that the light rays are bent so that in the middle of the adapter they are "collimated".

It's this collimation that lets you stick arbitrarily thick flat filters in the middle without changing the focal plane or introducing aberrations. The sales literature is completely correct on that point -- no problem there.

However, the sales literature then goes on to say "No wavelength shift! All light hits filter at same angle." Sure enough, that's what the diagram shows. It's very convincing. It's also wrong, except for one special point right in the center of the field.

Here's the problem.

Image

Now you can see the catch: the sales literature only shows rays corresponding to that special point in the center of the field.

When you look at rays for off-center points, a very different picture appears.

In the "collimated" region, all the rays corresponding to each point on the subject are indeed parallel to each other. That's why you can stick anything planar in there without changing focus or introducing aberrations.

However, the rays for those off-center points are NOT exactly parallel to the optical axis as implied by the Photometrics sales lit. They're probably a lot more parallel to the axis than the rays coming straight out of the microscope. But perfectly parallel, nope. If they were, there'd be no way to distinguish rays corresponding to one point from rays corresponding to another.

Notice that I'm only complaining about the sale literature, not the XT2 itself. Most likely the device does exactly what the sales lit says it does, but it's exact only in the center of the field. As you move toward the edges of the field, light will hit the filter at slightly different angles, and you just have to make sure the shift is still within tolerances for the wavelengths involved.

--Rik

g4lab
Posts: 1437
Joined: Fri May 23, 2008 11:07 am

Post by g4lab »

As always , Rik's analysis is right on the money.
I hope all our list members appreciate the degree to which he shares the amazing resource that is his mind, as well as his great didactic and pedagogic abilities. He never fails to think something through and then whip up a diagram or experiment or series of them to all of our benefits.

Thank you Rik! =D> :smt023

rjlittlefield
Site Admin
Posts: 23561
Joined: Tue Aug 01, 2006 8:34 am
Location: Richland, Washington State, USA
Contact:

Post by rjlittlefield »

Well, I'm glad you find my musings helpful. It's kind of an odd situation. I'm just real curious about how things work, so I feel compelled to make sense of them, but I'm also such a skeptic I feel compelled to flesh out the analysis and check it experimentally if possible 'cuz I know how easy it is to mess up. Then after I've gone to all that work, I figure I'll forget it real quick unless I write it down, and if I'm writing it down I might as well post it out so that somebody else can cross-check it too.

If this all makes sense, then, um, thanks for helping me out! :)

--Rik

Panteren
Posts: 4
Joined: Wed Feb 15, 2012 7:34 pm
Location: Copenhagen

Post by Panteren »

Thank you all for the feedback and for your time. I am sorry about the time it has taken me to answer. I have been down with the flu, and spent my time musing about the alcohol content of my toddies instead of optical filters.

@Rik
As it applies to these filters, my understanding is that "collimated" refers to the angle at which any ray hits the filter. That is, the filter may have almost zero transmission for a particular wavelength when the ray strikes perpendicular to the filter, but considerably higher transmission for the same wavelength when it strikes at a different angle. This is typical for interference filters, because the path length spacing between layers becomes larger at greater angles from the perpendicular.
Exactly. Your suggestion and explanation got me thinking in a whole new direction. What I had thought of in the beginning was something along the XT2 - and thank you very much for the offer Gene! But as you say, Rik:
In practice, the cones might be perpendicular enough if you simply use a long focal length macro lens, and leave out the collimator.


I have made a sketch of the system as I envision it now. The main idea is to use the distance between the filter and the lens for collimation as you said. But instead of placing it right next to the lens, I place it right next to the slide, making it easier to control the illumination of the slide. The distance will still work as a collimator and the lens only see light, which has entered with a low angle of incidence. The sketch is not to scale I might add.

Image

Instead of using bandpass filters as I originally planned, I have talked with the engineer at Edmund Optics where I order from as both Rik and Chris suggested and ordered some longpass filters http://www.edmundoptics.com/products/di ... c#products. They are less sensitive to non-collimated light than bandpass filters; the ballpark shift in the cut-off frequency is a 10 % drop, when the angle of incidence has increased to 45 degrees. That makes using the distance as collimator acceptable, depending on the distance of course. They are also cheaper, so I went for the 50 mm option instead of 25 mm.

@Chris
Would you mind telling us the excitation and emissions wavelengths for your microspheres?
Not at all, approximate excitation/emission in nm:
UV-Blue: 365/415
Green: 490/515
Carmine 580/620

Regarding the excitation light there is no need for it to be collimated; I hope to rely on cheap LEDs for that part. I have got the money for the parts, that is the LEDs, the longpass filters and a macro lens. I will borrow the camera in the beginning (a Nikon D5100 AFAIK), if it all works as planned, we will properly buy one dedicated for the purpose. I also quite like the idea of how cheap this is, compared to the alternative. I might even experience a bit schadenfreude, if this approx 2000$ set-up gives images of comparable quality as a fragile 100.000$ scanner :twisted: - but I will try to restrain myself :wink:.


As said I can use a Nikon D5100 (if I remember the model correctly). Regarding the macro lens I had my eye on a Nikon Micro-Nikkor, 40 mm F/2.8 (G AF-S DX). The minimum working distance (lens to subject) at maximum magnification is 3.5 cm. Assuming the front lens is also 3 cm and since maximum magnification is 1:1 the FOV must be 15.6 x 23.6mm with pixelsize at 0.48x0.48 microns. Thus, the maximum angle of incidence between the filter and any light seen by the camera must be arctan( [(30mm+23.6mm)/2]/35mm ) = 37.4 degrees. That is more than I like, but I do not need maximum resolution. I do not know if I can use that fact to increase the distance enough? I doubt it.

Another option I have looked at is the Nikon Micro-Nikkor, 85 mm F/3.5 (G ED AF-S DX VR) with a minimum working distance (lens to subject) at 14.5 cm. Assuming a front lens at 5 cm, that gives a maximum angle of incidence between the filter and any light seen by the camera at arctan([(50mm+23.6mm)/2]/145mm ) = 14.2 degrees, much less than before, and again I do not need maximum resolution.

The first option is cheaper though, but unless there is a way to increase the working distance significantly on the lens while retaining a magnification around 1.5:1, I think I should go for the something around 70-90mm.

I really appreciate your comments and interest, and hope that you have some more regarding the set-up and which objective I should choose. :)

Anders

rjlittlefield
Site Admin
Posts: 23561
Joined: Tue Aug 01, 2006 8:34 am
Location: Richland, Washington State, USA
Contact:

Post by rjlittlefield »

FOV must be 15.6 x 23.6mm with pixelsize at 0.48x0.48 microns.
The latter number seems wrong. I think you meant 4.8x4.8 microns -- about 1/3000 of the frame height.
Another option I have looked at is the Nikon Micro-Nikkor, 85 mm F/3.5 (G ED AF-S DX VR) with a minimum working distance (lens to subject) at 14.5 cm. Assuming a front lens at 5 cm, that gives a maximum angle of incidence between the filter and any light seen by the camera at arctan([(50mm+23.6mm)/2]/145mm ) = 14.2 degrees
I think the calculation is not correct, but it's giving an error in the safe direction. What matters is the FOV and the location and size of the lens entrance pupil, not the front element diameter. The maximum angle is from one corner of the FOV to the opposite side of the entrance pupil. The diagonal of 15.6 x 23.6mm is 28.3 mm. At f/3.5, the entrance pupil will be diameter 25.3 mm. If the entrance pupil were to be located at the front of the lens, 145 mm from the subject, then at f/3.5 and 1:1, you'd be looking at arctan([(28.3+25.3)/2]/145) = 10.4 degrees.

In practice, the entrance pupil is farther back inside the lens so the angle will be less. With my Canon 100mm f/2.8L IS USM at 1:1, the entrance pupil is actually way back near the sensor, about 300 mm away from the subject.
I think I should go for the something around 70-90mm
I agree, or even a bit longer. High quality 100mm macro lenses are commonly available and easy to work with. There is no good way to increase the working distance of a short lens, and any good lens should have no trouble seeing bright spots that are 3 pixels wide.

By the way, I am curious about the distribution of spheres within the tissue samples. Do they end up touching each other, so that you have to distinguish the spots within a connected mass? Or do they remain separated, so that mostly all you have to do is count isolated dots? If it's the latter, then you have a lot more slack in the resolution.

--Rik

Panteren
Posts: 4
Joined: Wed Feb 15, 2012 7:34 pm
Location: Copenhagen

Post by Panteren »

You are correct. The resolution is about 4.8 microns.
What matters is the FOV and the location and size of the lens entrance pupil, not the front element diameter.
The farthest distance is of course the diagonal-my error-but I do not understand the argument about the entrance pupil. The front element determines how large an angle you receive light from an object in and thus also how much is refracted and passes to the entrance pupil? The size of the entrance pupil itself is of lesser importance here. I think of it as similar to a pair of binoculars where the front element determines the light sensitivity. Why have a big frontal lens if you do not use its entire width to refract light to the entrance pupil (or the eye). Where do I err?
By the way, I am curious about the distribution of spheres within the tissue samples. Do they end up touching each other, so that you have to distinguish the spots within a connected mass? Or do they remain separated, so that mostly all you have to do is count isolated dots? If it's the latter, then you have a lot more slack in the resolution.
I hope to be able to image tissue slabs 200 microns thick. That is quite a lot in microscopy, but as I do not care for tissue details but only bright dots it is fine. It worked with the laser scanning microscope. As I go for 1:1 or less magnification DOF should not be a problem from what I can read on this site.

Having slabs this thick increases the risk that several of the spheres being very close to or on top of each other, but so far it has not been a problem. Although I had expected them to line up in a cluster in the same blood vessels sometime I have not experienced that either.

I would still like the high resolution though. The microspheres from the reference blood sample are retrieved by destroying the blood cells and then filtering the sample through a micro filter that catches the spheres. Here the spheres often touch each other. Since there is only a few micro filters to count compared to tissue samples, I could do it manually in a normal fluorescent microscope, but it does take quite some time and is more prone to errors than an automatic process.


The longpass filters are on their way, should receive them this week.
I have a problem with the narrow spectrum LEDs. Apparently the order has not been registered correct by the company.
I have been looking at different lenses but have not settled on one yet. I will read through some more of the forum before I decide: There has been an alarming increase in the number of things I know nothing about...

Anders

rjlittlefield
Site Admin
Posts: 23561
Joined: Tue Aug 01, 2006 8:34 am
Location: Richland, Washington State, USA
Contact:

Post by rjlittlefield »

Panteren wrote:but I do not understand the argument about the entrance pupil. The front element determines how large an angle you receive light from an object in and thus also how much is refracted and passes to the entrance pupil? The size of the entrance pupil itself is of lesser importance here.
Remember that the "entrance pupil" is simply how the aperture appears to be, from a position outside the lens.

Inside the lens, it is the aperture, not the front lens element, that determines which rays can get through to the sensor.

Outside the lens, it is still the aperture that determines which rays can get through, but because of refraction it's easier to identify those rays by thinking in terms of where the aperture appears to be. That's the entrance pupil. Light rays that are outside the lens and headed for the entrance pupil get bent so as to pass through the real aperture; all others get blocked.

Thus it is entirely the entrance pupil that determines which light rays get through to the sensor. The size of the front element of the lens plays no role here.
I think of it as similar to a pair of binoculars where the front element determines the light sensitivity. Why have a big frontal lens if you do not use its entire width to refract light to the entrance pupil (or the eye). Where do I err?
In binoculars, the front element is the entrance pupil, so of course its diameter determines which light rays get through. But in camera lenses, the front element is not the entrance pupil. Instead, the entrance pupil typically sits well behind the front element. As a result, only a portion of the front element is used for each point on the subject, and it is a different portion for every point on the subject. The only way that all points on the subject could use the entire front element would be if the aperture and the front element appeared to be at the same place, which they don't. The reason the front element is large is to avoid blocking the entrance pupil for off-axis rays.
I hope to be able to image tissue slabs 200 microns thick. That is quite a lot in microscopy, but as I do not care for tissue details but only bright dots it is fine. It worked with the laser scanning microscope. As I go for 1:1 or less magnification DOF should not be a problem from what I can read on this site.
200 microns should be OK. Even with very "picky" settings of CoC=10 microns and nominal f/4 (f/8 effective), I calculate DOF 160 microns.

--Rik

johnsankey
Posts: 20
Joined: Fri Mar 02, 2012 6:54 am

calculate angular precision required

Post by johnsankey »

Anders, a first approximation to the angular precision required is the thickness of the filter thin-flm stack (all layers) compared to the wavelength of the light you are looking at is:

thickness*(1-cos(angle)) < lamda/4

For narrow-band-pass filters, the thickness will increase as the bandwidth of the filter decreases, since more layers are required.
Ask your filter supplier either
1. what is the thin film stack thickness, or
2. what angular precision is required to achieve the transmission accuracy you require.

You may find it's less critical than you think.

Panteren
Posts: 4
Joined: Wed Feb 15, 2012 7:34 pm
Location: Copenhagen

Post by Panteren »

I thank you again Rik, for your patience and time.

My supervisor have had me put all my attention towards other projects. As several of the parts were delayed I will not be able to finish and validate the scanner before I have to hand in my thesis in the end of april. On the bright side, I have been employed in a time limited position afterwards to finish the scanner and other projects.

So: very few updates - if any - on the project untill the end of april.

@ John:
Thank you for the suggestion. I had planned to test the filters by mounting them in a way where I could adjust the angle to the LEDs and see at what angle the first light from the LEDs could be detected. It would be interesting to compare to the figure from the company.

Anders

Post Reply Previous topicNext topic