Example #1
0
  /**
   * Processes a product and compares it to processed product known to be correct
   *
   * @throws Exception general exception
   */
  @Test
  @Ignore
  public void testProcessing() throws Exception {
    final File inputFile = new File(s1FolderFilePath);
    final Product sourceProduct = TestUtils.readSourceProduct(inputFile);

    final TOPSARDeburstOp op = (TOPSARDeburstOp) spi.createOperator();
    assertNotNull(op);
    op.setSourceProduct(sourceProduct);

    // get targetProduct: execute initialize()
    final Product targetProduct = op.getTargetProduct();
    TestUtils.verifyProduct(targetProduct, false, false);

    final Band targetBand = targetProduct.getBandAt(0);
    assertNotNull(targetBand);

    final int bandWidth = 5000; // targetBand.getRasterWidth();
    final int bandHeight = 5000; // targetBand.getRasterHeight();

    // readPixels: execute computeTiles()
    final float[] floatValues = new float[bandWidth * bandHeight];
    targetBand.readPixels(0, 0, bandWidth, bandHeight, floatValues, ProgressMonitor.NULL);
  }
Example #2
0
 @Before
 public void setUp() throws Exception {
   TestUtils.initTestEnvironment();
   spi = new TOPSARDeburstOp.Spi();
   GPF.getDefaultInstance().getOperatorSpiRegistry().addOperatorSpi(spi);
 }