class to create image objects
class with threshold method