private ImageProcessor bwAreaOpen(ImageProcessor region, int size){
		ImageProcessor result = region.convertToByteProcessor();
		result.threshold(0);
		result.invert();
		ImagePlus ip = new ImagePlus("Temp", result);
		ParticleAnalyzer pa = new ParticleAnalyzer(ParticleAnalyzer.IN_SITU_SHOW | ParticleAnalyzer.SHOW_MASKS, 
				0, new ResultsTable(), size, Double.POSITIVE_INFINITY);
		pa.analyze(ip);	
		result = ip.getProcessor();
		result.invertLut();
		return result;
	}