Map<String, Product> getProductMap() { final Map<String, Product> productMap = new HashMap<>(5); productMap.put("source", getSourceProduct()); if (collocationCrsUI.getRadioButton().isSelected()) { productMap.put("collocateWith", collocationCrsUI.getCollocationProduct()); } return productMap; }
@Override protected void onReset() { final Product collocationProduct = collocationCrsUI.getCollocationProduct(); ImageGeometry imageGeometry; if (collocationCrsUI.getRadioButton().isSelected() && collocationProduct != null) { imageGeometry = ImageGeometry.createCollocationTargetGeometry(sourceProduct, collocationProduct); } else { imageGeometry = ImageGeometry.createTargetGeometry(sourceProduct, crs, null, null, null, null, null, null, null, null, null); } outputGeometryFormModel.resetToDefaults(imageGeometry); } }
workCopy = new OutputGeometryFormModel(outputGeometryModel); } else { final Product collocationProduct = collocationCrsUI.getCollocationProduct(); if (collocationCrsUI.getRadioButton().isSelected() && collocationProduct != null) { workCopy = new OutputGeometryFormModel(sourceProduct, collocationProduct);
private void updateProductSize() { int width = 0; int height = 0; final Product sourceProduct = getSourceProduct(); if (sourceProduct != null && crs != null) { if (!reprojectionModel.preserveResolution && outputGeometryModel != null) { PropertySet container = outputGeometryModel.getPropertySet(); width = container.getValue("width"); height = container.getValue("height"); } else { ImageGeometry iGeometry; final Product collocationProduct = collocationCrsUI.getCollocationProduct(); if (collocationCrsUI.getRadioButton().isSelected() && collocationProduct != null) { iGeometry = ImageGeometry.createCollocationTargetGeometry(sourceProduct, collocationProduct); } else { iGeometry = ImageGeometry.createTargetGeometry(sourceProduct, crs, null, null, null, null, null, null, null, null, null); } Rectangle imageRect = iGeometry.getImageRect(); width = imageRect.width; height = imageRect.height; } } infoForm.setWidth(width); infoForm.setHeight(height); }