Skip to main content

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

  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.

Project details


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

fw_gear_oct_qa-0.0.1.dev0-py3-none-any.whl (14.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page