Package net.ivoa.image

Examples of net.ivoa.image.ImageTiler


  private void doTestTile(int x, int y, int w, int h) throws Exception {
    int[] cor = new int[]{x, y};
    int[] siz = new int[]{w, h};

    ImageTiler t = ihdu.getTiler();

    float[] tile = new float[w * h];
    t.getTile(tile, cor, siz);
    for (int pos_x = x; pos_x < (x + w); pos_x++)
      for (int pos_y = y; pos_y < (y + h); pos_y++) {
        assertEquals(getValue(pos_x, pos_y), tile[h * (pos_x - x)
            + (pos_y - y)], 0);
      }
View Full Code Here


   */
  public ImageHDU getSubImageHDU(int[] offset, int[] size)
      throws FitsException {
    ImageHDU ret;
    try {
      ImageTiler tiler = getTiler();
      Object tile = tiler.getTile(offset, size);
      ret = new ImageHDU(this.getHeader(), new ImageData(tile));

      Header retHeader = ret.getHeader();
      for (int i = 0; i < offset.length; i++) {
        retHeader.addValue(Header.NAXIS + (i + 1), size[i], "Axis "
View Full Code Here

TOP

Related Classes of net.ivoa.image.ImageTiler

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.