Exemplo n.º 1
0
  private void prepareData() {

    double[] img = null;
    try {
      Object dataArray = tiler.getTile(new int[] {0, 0}, hdu.getAxes());
      img = (double[]) ArrayFuncs.convertArray(dataArray, double.class);
      data = (float[]) ArrayFuncs.convertArray(img, float.class);
      processingFriendlyData = (double[][]) ArrayFuncs.convertArray(hdu.getKernel(), double.class);
      imageFriendlyData = new double[width * height];
      for (int h = height - 1; h >= 0; h--) {
        for (int w = 0; w < width; w++) {
          imageFriendlyData[h * width + w] = (img[(height - 1 - h) * width + w]);
        }
      }
    } catch (IOException | FitsException e) {
      e.printStackTrace();
    }

    System.out.println(processingFriendlyData.length + ", " + processingFriendlyData[0].length);
  }