private void checkSourceProductType(final PolBandUtils.MATRIX sourceProductType) { if (sourceProductType == PolBandUtils.MATRIX.UNKNOWN) { throw new OperatorException("Input should be a polarimetric product"); } if (polDecomp instanceof HAlphaC2 && !PolBandUtils.isDualPol(sourceProductType)) { throw new OperatorException("Input should be a dual polarimetric product"); } else if (!(polDecomp instanceof HAlphaC2) && !PolBandUtils.isQuadPol(sourceProductType) && !PolBandUtils.isFullPol(sourceProductType)) { throw new OperatorException("Input should be a full polarimetric product"); } }
public void computeTiles(final Map<Band, Tile> targetTiles, final Rectangle targetRectangle, final Rectangle sourceRectangle) { if (PolBandUtils.isFullPol(sourceProductType)) { boxcarFilterFullPol(targetTiles, targetRectangle, sourceRectangle); } else if (PolBandUtils.isQuadPol(sourceProductType)) { boxcarFilterC3T3C4T4(targetTiles, targetRectangle, sourceRectangle); } else if (PolBandUtils.isDualPol(sourceProductType)) { boxcarFilterC2(targetTiles, targetRectangle, sourceRectangle); } else { throw new OperatorException("For Boxcar filtering, only C2, C3, T3, C4 and T4 are supported"); } }
public void computeTiles(final Map<Band, Tile> targetTiles, final Rectangle targetRectangle, final Rectangle sourceRectangle) { if (PolBandUtils.isFullPol(sourceProductType)) { refinedLeeFilterFullPol(targetTiles, targetRectangle, sourceRectangle); } else if (PolBandUtils.isQuadPol(sourceProductType)) { refinedLeeFilterC3T3C4T4(targetTiles, targetRectangle, sourceRectangle); } else if (PolBandUtils.isDualPol(sourceProductType)) { refinedLeeFilterC2(targetTiles, targetRectangle, sourceRectangle); } else { throw new OperatorException("For Refined Lee filtering, only C2, C3, T3, C4 and T4 are supported"); } }
private void addSelectedBands() throws OperatorException { String[] bandNames = null; boolean copyInputBands = false; if (sourceProductType == PolBandUtils.MATRIX.FULL) { bandNames = PolBandUtils.getT3BandNames(); } else if (PolBandUtils.isDualPol(sourceProductType)) { bandNames = PolBandUtils.getC2BandNames(); } else { copyInputBands = true; } for (PolBandUtils.PolSourceBand bandList : srcBandList) { String suffix = bandList.suffix; if (copyInputBands) { bandNames = new String[bandList.srcBands.length]; int i = 0; for (Band band : bandList.srcBands) { bandNames[i++] = band.getName(); } suffix = ""; } final Band[] targetBands = OperatorUtils.addBands(targetProduct, bandNames, suffix); bandList.addTargetBands(targetBands); } }