public void fillHole1() { if (this.state == CONTROLLER_STATE.CONTROLLER_HOLE) { this.holePixelsInfo = this.gridAlgorithm.findBoundaryAndHoles(); FillHoleAlgorithmFactory.getAlgorithmByType(A_TYPE.FILL_TYPE_DEFAULT, config) .fillHole(holePixelsInfo); refreshView(); this.state = CONTROLLER_STATE.CONTROLLER_NO_HOLE; } }
public void fillHole() { if (this.state == CONTROLLER_STATE.CONTROLLER_HOLE) { ArrayList<Pixel> boundaryPixels = this.gridAlgorithm2.findBoundary(); ArrayList<Pixel> holes = this.gridAlgorithm2.findHolePixels(boundaryPixels); FillHoleAlgorithmFactory.getAlgorithmByType(A_TYPE.FILL_TYPE_DEFAULT, config) .fillHole2(boundaryPixels, holes); refreshView(); this.state = CONTROLLER_STATE.CONTROLLER_NO_HOLE; } }