<s> import javabridge as J <EOL> def get_imageplus_wrapper ( imageplus_obj ) : <EOL> """<STR_LIT>""" <EOL> if imageplus_obj is None : <EOL> return None <EOL> class ImagePlus ( object ) : <EOL> def __init__ ( self ) : <EOL> self . o = imageplus_obj <EOL> lockSilently = J . make_method ( <EOL> '<STR_LIT>' , '<STR_LIT>' , <EOL> '''<STR_LIT>''' ) <EOL> unlock = J . make_method ( '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) <EOL> getBitDepth = J . make_method ( '<STR_LIT>' , '<STR_LIT>' , <EOL> '<STR_LIT>' ) <EOL> getBytesPerPixel = J . make_method ( '<STR_LIT>' , '<STR_LIT>' , <EOL> '<STR_LIT>' ) <EOL> getChannel = J . make_method ( '<STR_LIT>' , '<STR_LIT>' ) <EOL> getChannelProcessor = J . make_method ( <EOL> '<STR_LIT>' , '<STR_LIT>' , <EOL> '<STR_LIT>' ) <EOL> getCurrentSlice = J . make_method ( <EOL> '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) <EOL> def getDimensions ( self ) : <EOL> """<STR_LIT>""" <EOL> jresult = J . call ( self . o , '<STR_LIT>' , '<STR_LIT>' ) <EOL> return jresult <EOL> getFrame = J . make_method ( '<STR_LIT>' , '<STR_LIT>' ) <EOL> getHeight = J . make_method ( '<STR_LIT>' , '<STR_LIT>' ) <EOL> getID = J . make_method ( '<STR_LIT>' , '<STR_LIT>' ) <EOL> getImageStackSize = J . make_method ( '<STR_LIT>' , '<STR_LIT>' ) <EOL> getNChannels = J . make_method ( '<STR_LIT>' , '<STR_LIT>' , <EOL> '<STR_LIT>' ) <EOL> getNDimensions = J . make_method ( '<STR_LIT>' , '<STR_LIT>' , <EOL> '<STR_LIT>' ) <EOL> getNFrames = J . make_method ( '<STR_LIT>' , '<STR_LIT>' , <EOL> '<STR_LIT>' ) <EOL> getNSlices = J . make_method ( '<STR_LIT>' , '<STR_LIT>' , <EOL> '<STR_LIT>' ) <EOL> getProcessor = J . make_method ( '<STR_LIT>' , '<STR_LIT>' , <EOL> '<STR_LIT>' ) <EOL> getTitle = J . make_method ( '<STR_LIT>' , '<STR_LIT>' ) <EOL> getWidth = J . make_method ( '<STR_LIT>' , '<STR_LIT>' ) <EOL> setPosition = J . make_method ( '<STR_LIT>' , '<STR_LIT>' , <EOL> '<STR_LIT>' ) <EOL> setSlice = J . make_method ( '<STR_LIT>' , '<STR_LIT>' ) <EOL> setTitle = J . make_method ( '<STR_LIT>' , '<STR_LIT>' ) <EOL> getWindow = J . make_method ( '<STR_LIT>' , '<STR_LIT>' , <EOL> '<STR_LIT>' ) <EOL> return ImagePlus ( ) <EOL> def load_imageplus ( file_name ) : <EOL> """<STR_LIT>""" <EOL> imageplus_obj = J . make_instance ( '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> file_name ) <EOL> return get_imageplus_wrapper ( imageplus_obj ) <EOL> def make_imageplus_from_processor ( title , processor ) : <EOL> """<STR_LIT>""" <EOL> imageplus_obj = J . make_instance ( <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> title , processor ) <EOL> return get_imageplus_wrapper ( imageplus_obj ) </s>
