Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

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".

  1. dynamic_range: Dynamic range of the retinal image slice.
  2. 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. extraretinal_region
  3. variance_intraretinal: the variance of the retinal region. This is similarly derived as extraretinal variance.
  4. 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. sharpness_slope

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 is true.
  • 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.

Metadata

Release files for fw-gear-oct-qa 0.0.1.dev0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for fw-gear-oct-qa 0.0.1.dev0
File Interpreter ABI Platform
fw_gear_oct_qa-0.0.1.dev0-py3-none-any.whl Python 3 none any Details

Release files / fw_gear_oct_qa-0.0.1.dev0-py3-none-any.whl

Download URL fw_gear_oct_qa-0.0.1.dev0-py3-none-any.whl
Size 14.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
335067930e10f83db011e530c8a965423c340697eed7a388a72186e35a0a3f38
BLAKE2b-256 checksum
How to use checksums
a3c1c5cf6e1007948eeccb601250c4ac9d922c613fba851dd2e2f5d574540563
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.2 CPython/3.8.13 Linux/5.4.109+

Release history Release notifications | RSS feed

This release

0.0.1.dev0 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page