Ejemplo n.º 1
0
def openCroppedImageUsingBF(filepath,x,y,xw,yw,zs,ze, crop):
  # read in and display ImagePlus(es) with arguments
  options = ImporterOptions()
  options.setColorMode(ImporterOptions.COLOR_MODE_GRAYSCALE)
  if crop:
    options.setCrop(True)
    options.setCropRegion(0, Region(x,y,xw,yw))
    options.setTBegin(0, zs)
    options.setTEnd(0, ze)
  options.setId(filepath)
  imps = BF.openImagePlus(options)
  return imps[0]