Exemplo n.º 1
0
 /**
  * Writes a grayscale image
  *
  * @param scores The grayscale image to be written as a {@link Matrices.IntMatrix IntMatrix}
  *     object
  * @param filename The filename (without extension) to be written to
  */
 public static void WriteScoreImage(String filename, SimpleMatrix scores) {
   BufferedImage image =
       new BufferedImage(scores.getWidth(), scores.getHeight(), BufferedImage.TYPE_BYTE_GRAY);
   scores.FillRaster(image.getRaster());
   WriteImage(filename, "TIFF", image);
 }
Exemplo n.º 2
0
 /**
  * Writes a binary image
  *
  * @param is The binary image to be written as a {@link BoolMatrix BoolMatrix} object
  * @param filename The filename (without extension) to be written to
  */
 public static void WriteIsMatrix(String filename, BoolMatrix is) {
   WriteImage(filename, "BMP", is.getBinaryImage());
 }
Exemplo n.º 3
0
 /**
  * Use the Java Advanced Imaging library to write a project DataImage (see the {@link
  * javax.media.jai.JAI#create(String, java.awt.image.RenderedImage, Object, Object) JAI save
  * function}) to the desired path
  *
  * @param filename the filename and path not including the extension of the image to be saved
  * @param format the format desired (also the extension)
  * @param image the image to be saved
  */
 public static void WriteImage(String filename, String format, DataImage image) {
   WriteImage(filename, format, image.getAsBufferedImage());
 }