return;
}
Roi.setColor(color);
Roi roi = null;
Roi roi1 = null;
Roi roi2 = null;
String name1 = name + "_H";
String name2 = name + "_V";
if (roiMap.containsKey(name)) {
roi = roiMap.get(name);
imagePlus.deleteRoi(roi);
roiMap.remove(name);
roi = null;
}
// In case of cross
if (roiMap.containsKey(name1)) {
roi1 = roiMap.get(name1);
imagePlus.deleteRoi(roi1);
roiMap.remove(name1);
roi1 = null;
}
// In case of cross
if (roiMap.containsKey(name2)) {
roi2 = roiMap.get(name2);
imagePlus.deleteRoi(roi2);
roiMap.remove(name2);
roi2 = null;
}
switch (shape) {
case NONE:
System.out.println("REMOVE ROI : " + name);
break;
case RECTANGLE:
roi = new Roi(x, y, width, height);
break;
case OVAL:
roi = new OvalRoi(x, y, width, height);
break;
case CROSS: