双光子介观显微镜
Two-Photon Mesoscope

原始链接: https://github.com/benkrasnow/Two_photon_mesoscope

本项目记录了一台自制的双光子激光扫描介观显微镜,用于对经透明化和染色处理的小型标本进行三维成像,例如鱼类、蛙类、幼鼠和植物。1064 nm 飞秒激光经扩束后,由 XY2-100 振镜扫描,通过扫描透镜聚焦——最好使用反向安装的尼康 50 mm f/2——并由 PMT 检测;同时由 Teensy 3.2 协调振镜、Z 轴平台、消隐和 ADC 采集。显微镜通过 Web Serial 在浏览器中控制,并提供固件、接线、串口协议和数据格式。 一个独立的单文件查看器无需安装:下载 volume_viewer.html 以及相应的 .json 元数据和 .u16 体素文件,即可浏览正交视图、调整电平/伽马/颜色映射、播放 Z 切片动画、降噪、过滤热像素,并运行轴向反卷积。示例图像展示鱼类解剖结构、幼鼠骨骼、蛙类骨骼,以及二次谐波(SHG)与荧光的对比。该仓库包含采集软件、Teensy 固件、体数据格式文档、激光安全指南和 MIT 许可证。

黑客新闻 最新 | 往期 | 评论 | 提问 | 展示 | 招聘 | 提交 登录 双光子介观显微镜 ( github.com/benkrasnow ) 9 分 由 tobr 1 小时前 | 往期 | 收藏 | 1 条评论 帮助 fhn 4 分钟前 [–] 相关视频:“用这台独特的“介观显微镜”轻松理解双光子显微术” https://www.youtube.com/watch?v=wWyB3UKfO0c 回复 指南 | 常见问题 | 列表 | API | 安全 | 法律 | 申请 YC | 联系 搜索:
相关文章

原文

A home-built two-photon laser-scanning mesoscope for imaging whole small specimens in 3D: cleared and stained fish, frogs and mice, plants. A femtosecond 1064 nm laser is scanned by an XY2-100 galvo head, focused through a scan lens, and the fluorescence is collected by a PMT. A Teensy 3.2 drives the galvos, the Z stage and the laser blanking, and digitises the PMT. Everything is run from a browser page over Web Serial, and the 3D volumes can be explored in a standalone viewer page.

Volume viewer showing a cleared fish skeleton

Quick start: explore the data

No installation and no microscope are needed. Everything runs locally in your browser.

  1. Download the viewer. Save volume_viewer.html to your computer: open it on GitHub and click the "Download raw file" button.

  2. Download one volume. From the raw data folder on Google Drive, download one matching pair of files:

    • volume_<date>.json, the scan metadata, and
    • volume_<date>_ch0.u16, the raw 16-bit voxel data.

    Both files must have the same name stem. The .u16 files are large (often 100 MB or more).

  3. Open the viewer. Double-click volume_viewer.html. It opens in your web browser; a recent Chrome or Edge is recommended.

  4. Load the volume. Click Open files… and select both the .json and the .u16 file together (Ctrl-click or Shift-click). You can also drag both files onto the page.

  5. Explore:

    • Move through the volume: click or drag in any of the three orthogonal views to move the crosshair, and use the mouse wheel over a view to step through slices.
    • Animate the depth: press Play (or the space bar) to loop through the depth (Z) planes.
    • Adjust brightness and contrast: drag the black and white handles on the histogram, and use the gamma slider. Try the verdigris colour map.
    • Clean up the image: turn on Denoise and Hot pixels to suppress noise and bright speckles.
    • Deconvolve: Axial deconvolution sharpens the depth (Z) direction; the result appears as a new channel you can switch to.

Cleared fish head, two-photon, imaged through the Nikon 50 mm lens

Fish, through the 50 mm camera lens. Two-photon image of the head of a cleared and stained fish, taken with the reversed Nikon 50 mm f/2 as the scan lens. The jaws and teeth, eye, gill arches, pectoral fin, vertebrae and individual scales are visible.

Cleared mouse pup skeleton, two-photon Cleared frog skeleton, two-photon
Mouse pup ("pinky"). Two-photon image of a cleared mouse pup skeleton stained with alizarin red, showing the skull, ribs, limbs and vertebrae. Frog. Two-photon image of a cleared and stained frog skeleton, showing the skull, spine, pelvis and long bones of the legs.
Diaphonized mouse pup in a dish Cleared and stained fish in the sample cuvette
The mouse specimen. The cleared ("diaphonized") mouse pup under normal light, with the bones stained red. The fish specimen. The cleared and double-stained fish (bone red, cartilage blue) in its sample cuvette.
Two-photon emission visible in a dark room Frog imaged through an IR-cut filter (left) and with an added 532 nm bandpass filter (right)
Two-photon emission you can see. The frog specimen photographed in a dark room during a scan. The fluorescence is excited only near the laser focus, so it appears as bright spots inside the cuvette. Fluorescence vs. second-harmonic generation. The frog imaged with an IR-cut filter only (left) and with the IR-cut filter plus a 532 nm bandpass filter (right). The 532 nm bandpass passes only light at half the 1064 nm laser wavelength, so the right image shows second-harmonic generation (SHG).

System overview

System overview. The optical table, with the femtosecond laser at lower left, the beam expander, the XY2-100 galvo scanner at lower right, the PMT detector housing in the centre, the specimen cuvette on the Z stage, and the Teensy and driver electronics.

Optical path: femtosecond laser (1064 nm) → electromechanical shutter → attenuator (a rotating polarizing beam splitter inside a beam dump) → beam expander (10 mm beam) → XY2-100 galvo scanner → scan lens → specimen. Fluorescence is collected by a PMT above the specimen.

  • Laser. An Oscillate Photonics Kyma femtosecond 1064 nm laser.

  • Detector. A used (eBay) Hamamatsu R3896-05 photomultiplier tube (datasheet). The PMT anode feeds a transimpedance amplifier with a gain of 1 kΩ (1 V per mA), whose output goes to the Teensy ADC input.

  • Scan lens. The system started with a 63 mm f-theta laser-marking lens. A Nikon 50 mm f/2 camera lens works much better. Mount it with the camera-body (rear) end facing the specimen and the front element facing the galvos.

  • Z stage. A stepper-driven stage moves the specimen through focus to build up a 3D stack.

Laser safety. This instrument uses an invisible, high-peak-power infrared laser. Use appropriate laser safety eyewear, beam blocks and enclosures.

This is a standalone, single-file viewer for saved volumes. It needs no server and no installation.

  • Large orthogonal views (axial XY, coronal XZ, sagittal YZ) with a linked crosshair, physical aspect ratio, flip X/Y and Z stretch.

  • A histogram of the whole volume with draggable black and white levels, gamma, and colour maps: gray, verdigris, green, hot and inverted.

  • Denoising: Gaussian smoothing of the displayed slices, scaled to the voxel spacing.

  • Hot-pixel filtering: pixels above a fixed threshold, or much brighter than their neighbours, are replaced by the neighbour mean.

  • Playback through the Z planes at an adjustable speed.

  • Axial deconvolution, Richardson–Lucy along Z, with three PSF options:

    • a model PSF (Lorentzian or Gaussian);
    • a PSF measured from a scan of a thin fluorescent sheet;
    • a PSF loaded from file.

    It runs in parallel Web Workers, and the result can be saved as a new volume.

An interactive, single-file demo that shows visually how femtosecond pulses work: why a short pulse in time needs a broad spectrum. Download it and open it in a browser.

This controls the instrument over Web Serial. It needs Chrome or Edge and a Teensy running the firmware.

Volumes are saved as volume_<timestamp>.json plus volume_<timestamp>_chN.u16, one .u16 file per PMT channel.

  • Firmware: TwoPhotonFirmware/TwoPhotonFirmware.ino, for a Teensy 3.2. Build with the Arduino IDE and Teensyduino, with Board: Teensy 3.2 / 3.1 and USB Type: Serial. It handles:
    • XY2-100 galvo output, as differential pairs from GPIO with 330 Ω series resistors;
    • DMA-timed raster scans with synchronous ADC sampling;
    • stepper control for the Z stage, with acceleration and soft limits;
    • laser blanking.
  • Serial protocol: PROTOCOL.md describes the binary packet format between the browser app and the firmware.
  • Wiring: wiring_diagram.svg shows how to connect the Teensy 3.2 to the galvo controller's DB15 (XY2-100) connector, the Z stage driver, laser blanking and the PMT input.

Teensy to galvo wiring diagram

Each volume is a pair of files:

  • volume_<timestamp>.json holds the metadata:
    • the scan configuration: galvo corners x0, y0, x1, y1 in galvo counts, pixel counts nx, ny, dwell time, settle times, pattern and channel mask;
    • the Z position of each plane in µm (zUm);
    • the calibration (mmPerCount, originCounts);
    • the ADC full-scale voltage.
  • volume_<timestamp>_chN.u16 holds the raw voxels as unsigned 16-bit little-endian integers, ordered [z][y][x] with X varying fastest: planes × ny × nx values.

MIT; see LICENSE.

联系我们 contact @ memedata.com