SimpleImage baseFlameImg = renderRandomizedFlame(getCurrRandomizeFlame().makeCopy(), probeSize);
SimpleImage simplifiedBaseFlameImg = RandomFlameGeneratorSampler.createSimplifiedRefImage(baseFlameImg);
int iter = 0;
double bestCoverage = INVALID_COVERAGE;
Flame bestMutation = null;
while (true) {
Flame currMutation = getCurrRandomizeFlame().makeCopy();
List<MutationType> mutationTypes = createRandomMutationTypes();
for (MutationType mutationType : mutationTypes) {
int layerIdx = data.layersTable.getSelectedRow();
Layer layer = currMutation.getLayers().get(layerIdx);
mutationType.createMutationInstance().execute(layer);
}
SimpleImage renderedImg = renderRandomizedFlame(currMutation.makeCopy(), probeSize);
double coverage = renderedImg != null ? RandomFlameGeneratorSampler.calculateCoverage(renderedImg, 0, 0, 0, true) : INVALID_COVERAGE;
if (coverage > MIN_RENDER_COVERAGE) {
coverage = RandomFlameGeneratorSampler.calculateDiffCoverage(renderedImg, simplifiedBaseFlameImg);
}
if (coverage > MIN_DIFF_COVERAGE) {