/**
* Setting the positions of the polygons on the screen
*/
protected void initPolygons(DisplayImageDIResolver resolver,
ImageData imgData, ImageScaleState state, Point offset) {
IPolygonScaling scaler = resolver.getPolygonCalculator();
ImageData recalculated = scaler.recalculatePolygons(imgData, state);
recalculated = scaler.recalculatePolygonsOffsett(recalculated, offset);
for (Entry<Integer, NamedPolygon> item : recalculated.getPolygons().entrySet()) {
NamedPolygon poly = item.getValue();
int zIndex = item.getKey();
logger.debug("Add polygon: "+poly);
this.polygons.put(zIndex, poly); // maybe we should use meanX instead