Package gov.nih.mipav.model.file
Class FileSVS.JPEGComponentInputStream
- java.lang.Object
-
- java.io.InputStream
-
- gov.nih.mipav.model.file.FileSVS.JPEGComponentInputStream
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable
- Enclosing class:
- FileSVS
public class FileSVS.JPEGComponentInputStream extends java.io.InputStream
-
-
Field Summary
Fields Modifier and Type Field Description protected intbpsprotected intheightprotected intHfprotected intHMaxprotected intidprotected FileSVS.JPEGDCTInputStreaminprotected int[]qtprotected intshiftprotected intVfprotected intVMaxprotected intwidthprotected intXfprotected intYf
-
Constructor Summary
Constructors Constructor Description JPEGComponentInputStream(int id)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcopyDataUnit(byte[] buf, int off, int maxy, int maxx, int[] buffer)protected voidcopyDataUnit(int[] buf, int off, int maxy, int maxx, int[] buffer)protected voidcopyPixel(byte[] buf, int off, int maxy, int maxx, int b)protected voidcopyPixel(int[] buf, int off, int maxy, int maxx, int b)intgetId()intread()voidread(byte[] buf, int off, int maxy, int maxx)voidread(int[] buf, int off, int maxy, int maxx)voidrestart()voidsetBitsPerSample(int bps)voidsetDimensions(int h, int w)voidsetHuffmanTables(FileSVS.JPEGHuffmanInputStream dc, FileSVS.JPEGHuffmanInputStream ac)voidsetMaxSamplingRate(int VMax, int HMax)voidsetQuantizationTable(int[] qt)voidsetSamplingRate(int Vf, int Hf)voidsetShift(int shift)java.lang.StringtoString()
-
-
-
Field Detail
-
id
protected int id
-
shift
protected int shift
-
height
protected int height
-
width
protected int width
-
bps
protected int bps
-
Hf
protected int Hf
-
Vf
protected int Vf
-
HMax
protected int HMax
-
VMax
protected int VMax
-
Yf
protected int Yf
-
Xf
protected int Xf
-
qt
protected int[] qt
-
in
protected FileSVS.JPEGDCTInputStream in
-
-
Method Detail
-
getId
public int getId()
-
setShift
public void setShift(int shift)
-
setBitsPerSample
public void setBitsPerSample(int bps)
-
setDimensions
public void setDimensions(int h, int w)
-
setSamplingRate
public void setSamplingRate(int Vf, int Hf)
-
setMaxSamplingRate
public void setMaxSamplingRate(int VMax, int HMax)
-
setQuantizationTable
public void setQuantizationTable(int[] qt)
-
setHuffmanTables
public void setHuffmanTables(FileSVS.JPEGHuffmanInputStream dc, FileSVS.JPEGHuffmanInputStream ac)
-
restart
public void restart() throws java.io.IOException- Throws:
java.io.IOException
-
read
public int read() throws java.io.IOException- Specified by:
readin classjava.io.InputStream- Throws:
java.io.IOException
-
copyPixel
protected void copyPixel(int[] buf, int off, int maxy, int maxx, int b)
-
copyDataUnit
protected void copyDataUnit(int[] buf, int off, int maxy, int maxx, int[] buffer) throws java.io.IOException- Throws:
java.io.IOException
-
read
public void read(int[] buf, int off, int maxy, int maxx) throws java.io.IOException- Throws:
java.io.IOException
-
copyPixel
protected void copyPixel(byte[] buf, int off, int maxy, int maxx, int b)
-
copyDataUnit
protected void copyDataUnit(byte[] buf, int off, int maxy, int maxx, int[] buffer) throws java.io.IOException- Throws:
java.io.IOException
-
read
public void read(byte[] buf, int off, int maxy, int maxx) throws java.io.IOException- Throws:
java.io.IOException
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-