def get_samples_per_pixel(dicom):
  """
  Return the number of pixels per sample.
  
  Args:
    dicom: pydicom Dataset
  
  """
  try:
    return dicom.SamplesPerPixel
  except:
    raise Exception('Missing "SamplesPerPixel" DICOM tag')