Package hipi.image

Examples of hipi.image.FloatImage.readFields()


      /* DistributedCache will be deprecated in 0.21 */
      Path file = DistributedCache.getLocalCacheFiles(job.getConfiguration())[0];
      FSDataInputStream dis = FileSystem.getLocal(job.getConfiguration()).open(file);
      dis.skip(4);
      FloatImage image = new FloatImage();
      image.readFields(dis);
      mean = image.getData();
    }

    public void map(ImageHeader key, FloatImage value, Context context)
        throws IOException, InterruptedException {
View Full Code Here


      FloatImage image = decoder.decodeImage(fis);
      ByteArrayOutputStream bos = new ByteArrayOutputStream();
      image.write(new DataOutputStream(bos));
      ByteArrayInputStream bis = new ByteArrayInputStream(bos.toByteArray());
      FloatImage newImage = new FloatImage();
      newImage.readFields(new DataInputStream(bis));
      assertEquals(fileName[i] + " writable test fails", image, newImage);
    }
  }
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.