com.brownsoft.image
Class PGMDecoder

java.lang.Object
  extended bycom.brownsoft.image.PGMDecoder
Direct Known Subclasses:
PPMDecoder

public class PGMDecoder
extends java.lang.Object

Title: Proyecto Codificacion de Imagenes y Video

Description:

Copyright: Copyright (c) 2004

Company:

Version:
1.0
Author:
Gustavo Brown (alegus@adinet.com.uy)

Field Summary
protected  int BandCount
           
private  int[] buffer
           
protected  int ColorType
           
protected  java.lang.String filename
           
protected  java.lang.String HeaderId
           
private  int height
           
protected  java.lang.String ImageType
           
private  java.io.DataInputStream inputStream
           
private  double[][] matrix
           
private  int width
           
 
Constructor Summary
PGMDecoder(java.io.InputStream stream)
           
PGMDecoder(java.io.InputStream stream, java.lang.String ImageType, java.lang.String HeaderId, int BandCount, int ColorType)
           
PGMDecoder(java.lang.String filename)
           
 
Method Summary
 java.awt.Image getImage()
           
private  java.lang.String getLine()
          Obtiene una linea de texto de la imagen, obviando los comentarios
 double[][] getMatrix()
          Decodifica la imagen y retorna una matrix con los datos
 int[] getVector()
           
static void main(java.lang.String[] args)
           
 void showImage()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BandCount

protected int BandCount

buffer

private int[] buffer

ColorType

protected int ColorType

filename

protected java.lang.String filename

HeaderId

protected java.lang.String HeaderId

height

private int height

ImageType

protected java.lang.String ImageType

inputStream

private java.io.DataInputStream inputStream

matrix

private double[][] matrix

width

private int width
Constructor Detail

PGMDecoder

public PGMDecoder(java.io.InputStream stream)
           throws java.io.IOException

PGMDecoder

public PGMDecoder(java.io.InputStream stream,
                  java.lang.String ImageType,
                  java.lang.String HeaderId,
                  int BandCount,
                  int ColorType)
           throws java.io.IOException

PGMDecoder

public PGMDecoder(java.lang.String filename)
           throws java.io.IOException
Method Detail

getImage

public java.awt.Image getImage()
                        throws java.io.IOException
Throws:
java.io.IOException

getLine

private java.lang.String getLine()
                          throws java.io.IOException
Obtiene una linea de texto de la imagen, obviando los comentarios

Throws:
java.io.IOException

getMatrix

public double[][] getMatrix()
Decodifica la imagen y retorna una matrix con los datos


getVector

public int[] getVector()
                throws java.io.IOException
Throws:
java.io.IOException

main

public static void main(java.lang.String[] args)

showImage

public void showImage()