Exercise

Separate histograms

A poor tissue segmentation includes multiple tissue types, leading to a wide distribution of intensity values and more variance.

On the other hand, a perfectly segmented left ventricle would contain only blood-related pixels, so the histogram of the segmented values should be roughly bell-shaped.

For this exercise, compare the intensity distributions within vol for the listed sets of pixels. Use ndi.histogram, which also accepts labels and index arguments.

Instructions 1/2

undefined XP
    1
    2

Use the labels and index arguments to extract a histogram for each of the following set of pixels in vol:

  1. All pixels
  2. All labeled pixels
  3. Left ventricle pixels (i.e., label 1)