OCT Quality Assessment
Project description
OCT QA
This gear assesses the quality of OCT volumes and their slices. The criteria to flag a
slice is being bigger than 1.5 * Interquartile Range (IQR) or smaller than 1.5 * IQR for
each of the four measurement tests. If any slices are flagged in any of the four tests,
the overall_qc
test will be set to fail
. All test results are saved in the input
file's info dictionary under "qc":"oct-qa"
.
- dynamic_range: Dynamic range of the retinal image slice.
- variance_extraretinal: the variance of the extraretinal/vitreous region. This region gets segmented based on Otsu's thresholding method; it provides an estimate of the base noise of the image.
- variance_intraretinal: the variance of the retinal region. This is similarly derived as extraretinal variance.
- sharpness_slope: the sharpness of the edges between the black regions of the vitreous and the bright regions of the retinal layers; a higher slope indicates a sharper image.
The gear will:
- Update the metadata of the input file. See example output below.
- Generate histograms for three indexes so that low-quality slices can be flagged; these
histograms will only be generated if
save_figures_if_fail
istrue
. - Output a csv with slice QA measurements/indexes for further analysis.
"qc": {
"oct-qa": {
"job_info": {
"version": "0.0.5-d",
"job_id": "",
"inputs": {
"raw_input": {
"parent": {
"id": "60f71983a7fe04f03224792e",
"type": "acquisition"
},
"file_id": "610d9bff9c47094a376b8ddb",
"version": 1,
"file_name": "oct_volume_test.npy"
}
},
"config": {
"debug": true,
"save_figures_if_fail": true
}
},
"dynamic_range": {
"state": "PASS",
"data": {
"Mean Dynamic range": 1.044,
"Standard deviation Dynamic range": 0.021,
"Outliers Dynamic range": "No slices flagged"
}
},
"variance_extraretinal": {
"state": "PASS",
"data": {
"Mean Variance Extraretinal region": 255.445,
"Standard deviation Variance Extraretinal region": 14.182,
"Outliers Variance Extraretinal": "No slices flagged"
}
},
"variance_intraretinal": {
"state": "PASS",
"data": {
"Mean Variance Intraretinal": 2050.806,
"Standard deviation Variance Intraretinal": 134.474,
"Outliers Variance Intraretinal": "No slices flagged"
}
},
"sharpness_slope": {
"state": "PASS",
"data": {
"Mean Sharpness slope": 19.047,
"Standard deviation Sharpness slope": 0.487,
"Outliers Sharpness slope": "No slices flagged"
}
},
"overall_qc": {
"state": "PASS",
"data": {
"result": "all qc tests passed"
}
}
}
}
Usage
Inputs
- raw_input: Raw OCT slices (.npy, .dcm or .dcm.zip)
Configuration
- debug (boolean, default False): Include debug statements in output.
- save_figures_if_fail (boolean, default False): If any of the qa tests fail, save all generated histograms within the parent container.
Contributing
For more information about how to get started contributing to that gear, checkout CONTRIBUTING.md.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
File details
Details for the file fw_gear_oct_qa-0.0.1.dev0-py3-none-any.whl
.
File metadata
- Download URL: fw_gear_oct_qa-0.0.1.dev0-py3-none-any.whl
- Upload date:
- Size: 14.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.2 CPython/3.8.13 Linux/5.4.109+
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 335067930e10f83db011e530c8a965423c340697eed7a388a72186e35a0a3f38 |
|
MD5 | cfe2b4eaa789f9bdeee96a0044b5acca |
|
BLAKE2b-256 | a3c1c5cf6e1007948eeccb601250c4ac9d922c613fba851dd2e2f5d574540563 |