git clone https://github.com/petteriTeikari/OCT_processing
- Get some example .img data to `/data' folder
- Run
process_folder_of_OCT_scans.m
- This will process all the .img files found from
/data
folder with the associated custom croppings
Now we are computing A-scan(s) from OCT cube so you would like to specify which A-scan you would like to use that you can do there which is just a tab-delimited text file that can be auto-generated using update_A_scan_ROI.m based on the fixed values defined in read_config.m.
The function update_A_scan_ROI.m
is however called on every run of process_folder_of_OCT_scans.m, and if you add new files to data
it should initialize them with the default values, and you can later modify them manually if you for example find the coordinates using ImageJ.
At the moment the right vs. left eye is determined from filename, if the filename contains OD or OS (not case-sensitive). If the filename does not contain that, the pipeline has no idea from which eye the scan was from.
Processing pipeline with the raw 8-bit .img Zeiss OCT input, followed by BM4D Denoising in LOG domain (OCT noise is multiplicative). (2nd row) Despeckling with L0 Smoothing which is used for more robust peak finding, while the actual peak value is read from the BM4D Denoised cube (well frame in our case)
The same with CLAHE in ImageJ/FIJI with a maximum slope of 2 to enhance the contrast:
When you pick improper A-scan, the canonical 2-peak characteristic is missing and when the denoised signal for peak finding is not smooth enough, the Matlab findpeaks just finds two peaks very close to each other: