linumpy.microscope.oct#
Spectral-domain OCT data loader for ThorLabs microscopes.
Classes#
Spectral-domain OCT class to reconstruct the data. |
Module Contents#
- class linumpy.microscope.oct.OCT(directory, axial_res=3.5)[source]#
Spectral-domain OCT class to reconstruct the data.
- Parameters:
directory (string) – Path to the directory containing the raw tiles and info file.
axial_res (float, optional) – Axial resolution of the data in microns.
- read_scan_info(filename)[source]#
Read the scan information file.
- Parameters:
filename (pathlib.Path) – Path to the scan_file written by the OCT (.txt)
- Return type:
None
- load_image(crop=True, fix_galvo_shift=True, fix_camera_shift=False)[source]#
Load an image dataset.
- Parameters:
crop (bool) – If crop is True, the galvo returns will be cropped from the volume
fix_galvo_shift (bool | int | None) – If True, the shift caused by the galvo mirror return will be evaluated from the data. If an integer value is given, this value will be used to fix the shift. The fix is only applied if detection confidence >= 0.3.
fix_camera_shift (bool) – If True, the camera shift will be evaluated and compensated from the data. This will detect the first pixel of the scan that is always overexposed and shift the data to compensate for this.
- Return type:
Notes
The returned volume is in this order : z (depth), x (a-line), y (b-scan)
This method doesn’t consider repeated a-lines or b-scans yet.
- property position_available: bool[source]#
Return True if the position is available in the info.txt file.
- Return type:
- property dimension: tuple[float, float, float][source]#
Return the OCT physical dimension in mm. Will be (1, 1, 1) if not found.
- property position: tuple[float, float, float][source]#
Return the OCT physical position in mm. Will be (0, 0, 0) if not found.