1. Learn
  2. /
  3. Courses
  4. /
  5. Biomedical Image Analysis in Python

Connected

Exercise

Measure variance

SciPy measurement functions allow you to tailor measurements to specific sets of pixels:

  • Specifying labels restricts the mask to non-zero pixels.
  • Specifying index value(s) returns a measure for each label value.

For this exercise, calculate the intensity variance of vol with respect to different pixel sets. We have provided the 3D segmented image as labels: label 1 is the left ventricle and label 2 is a circular sample of tissue.

Labeled Volume


After printing the variances, select the true statement from the answers below.

Instructions 1/2

undefined XP
    1
    2

Using vol and labels arrays, measure the variance of pixel intensities in the specified sets of pixels. Print them to the screen.