original_docstring: Opens an radiographic/gray scale image, stacks the channel to represent a RGB image and returns is as a 32bit float array.
docstring: Opens an radiographic/gray scale image, stacks the channel to represent a RGB image and returns is as a 32bit float array.
docstring_tokens: Opens an radiographic / gray scale image stacks the channel to represent a RGB image and returns is as a 32bit float array .
code: def open_gray_scale_image(fn):
      "Opens an radiographic/gray scale image, stacks the channel to represent a RGB image and returns is as a 32bit float array."
      if ".dcm" in str(fn).lower():
          img = open_dicom(str(fn))
      else:
          img = PIL.Image.open(str(fn))
  
      img = np.dstack([img, img, img])
      img = img.astype(np.float32)
      return img
code_tokens: def open_gray_scale_image ( fn ) : if ".dcm" in str ( fn ) . lower ( ) : img = open_dicom ( str ( fn ) ) else : img = PIL . Image . open ( str ( fn ) ) img = np . dstack ( [ img , img , img ] ) img = img . astype ( np . float32 ) return img
short_docstring: Opens an radiographic/gray scale image, stacks the channel to represent a RGB image and returns is as a 32bit float array.
short_docstring_tokens: Opens an radiographic / gray scale image stacks the channel to represent a RGB image and returns is as a 32bit float array .
comment: "Opens an radiographic/gray scale image, stacks the channel to represent a RGB image and returns is as a 32bit float array."