retooled to make imagej window unnecessary