/** * Add C2 or S2 bands to the target product. * * @throws OperatorException The exception. */ private void addSelectedBands() throws OperatorException { if (sourceProductType != PolBandUtils.MATRIX.FULL) { throw new OperatorException("Full polarimetric product is expected."); } String[] bandNames = null; if (outputFormat.equals(C2)) { bandNames = PolBandUtils.getC2BandNames(); addBands(bandNames); mapMatrixElemToBandsC2(); } else { if (compactMode.equals(CompactPolProcessor.lch)) { bandNames = PolBandUtils.getLCHModeS2BandNames(); } else { bandNames = PolBandUtils.getRCHModeS2BandNames(); } addBands(bandNames); mapMatrixElemToBandsS2(); } }
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); } }
case C2: bandNames = PolBandUtils.getC2BandNames(); matrixType = PolBandUtils.MATRIX.C2;
return getProductBands(srcProduct, bandNames, getT4BandNames()); } else if (sourceProductType == MATRIX.C2) { // compact pol C2 return getProductBands(srcProduct, bandNames, getC2BandNames()); } else if (sourceProductType == MATRIX.LCHCP) { // LCH compact pol S2 return getProductBands(srcProduct, bandNames, getLCHModeS2BandNames());