/** * Initializes all the internal file and directory elements from the given output file. This method only must be * called if the product writer should write the given data to raw data files without calling of writeProductNodes. * This may be at the time when a dimap product was opened and the data shold be continously changed in the same * product file without an previous call to the saveProductNodes to this product writer. * * @param outputFile the dimap header file location. */ protected void initDirs(final File outputFile) { super.initDirs(outputFile); final PolBandUtils.MATRIX matrixType = PolBandUtils.getSourceProductType(getSourceProduct()); String folder = ""; if (matrixType.equals(PolBandUtils.MATRIX.C3)) { folder = "C3"; } else if (matrixType.equals(PolBandUtils.MATRIX.T3)) { folder = "T3"; } else if (matrixType.equals(PolBandUtils.MATRIX.C4)) { folder = "C4"; } else if (matrixType.equals(PolBandUtils.MATRIX.T4)) { folder = "T4"; } if (!folder.isEmpty()) { _outputDir = new File(_outputDir, folder); if(!_outputDir.exists() && !_outputDir.mkdirs()) { SystemUtils.LOG.severe("Unable to create folders in "+_outputDir); } _outputFile = new File(_outputDir, outputFile.getName()); } }
if (matrixType.equals(PolBandUtils.MATRIX.C2)) { matrixDim = 2; } else if (matrixType.equals(PolBandUtils.MATRIX.C3) || matrixType.equals(PolBandUtils.MATRIX.T3)) { matrixDim = 3; } else { // matrixType.equals(MATRIX.C4) || matrixType.equals(MATRIX.T4) tgtIdx = tgtIndex.getIndex(x); if (matrixType.equals(PolBandUtils.MATRIX.C2)) { getScatterVector(srcIdx, dataBuffers, kr, ki); computeCovarianceMatrixC2(kr, ki, tempRe, tempIm); } else { if (matrixType.equals(PolBandUtils.MATRIX.C3)) { getCovarianceMatrixC3(srcIdx, sourceProductType, dataBuffers, tempRe, tempIm); } else if (matrixType.equals(PolBandUtils.MATRIX.C4)) { getCovarianceMatrixC4(srcIdx, sourceProductType, dataBuffers, tempRe, tempIm); } else if (matrixType.equals(PolBandUtils.MATRIX.T3)) { getCoherencyMatrixT3(srcIdx, sourceProductType, dataBuffers, tempRe, tempIm); } else if (matrixType.equals(PolBandUtils.MATRIX.T4)) { getCoherencyMatrixT4(srcIdx, sourceProductType, dataBuffers, tempRe, tempIm);