from ij import *
from ij.process import *
from ij.measure import *
from jhplot import *
# we open the file manually. Generate ImagePlus object
imp = IJ.openImage("https://datamelt.org/logo.png")
print dir(imp) # check image manipulation methods
# display it
imp.show()
print imp.getWidth()
# do manipulations with the clone
imp.getProcessor().setThreshold(174, 174, ImageProcessor.NO_LUT_UPDATE)
IJ.run(imp,"Convert to Mask","")
IJ.run(imp,"Watershed", "")
imp.show()
# get all the pixels
pix = imp.getProcessor().getPixels()
Ads help maintain this website.