public class Compressor extends Object implements Closeable
If the source image is already compressed it will be transcoded (i.e. first decompressed then compressed again).
Modifier and Type | Class and Description |
---|---|
private static class |
Compressor.CacheOutputStream |
private class |
Compressor.CompressedFrame |
Modifier and Type | Field and Description |
---|---|
private int |
avgPixelValueBlockSize |
private ImageWriter |
compressor |
private ImageWriteParam |
compressParam |
private PatchJPEGLS |
compressPatchJPEGLS |
private String |
compressTsuid |
private Attributes |
dataset |
private BufferedImage |
decompressedImageForVerification |
private Decompressor |
decompressor |
private int[] |
embeddedOverlays |
private IOException |
ex |
private ImageInputStream |
iis |
private ImageParams |
imageParams |
private static Logger |
LOG |
private int |
maxPixelValueError |
private VR.Holder |
pixeldataVR |
private Object |
pixels |
private TransferSyntaxType |
tsType |
private BufferedImage |
uncompressedImage |
private ImageReader |
verifier |
private ImageReadParam |
verifyParam |
Constructor and Description |
---|
Compressor(Attributes dataset,
String tsuid,
String compressTsuid,
Property... compressParams) |
Modifier and Type | Method and Description |
---|---|
private Property[] |
cat(Property[] a,
Property[] b) |
void |
close() |
boolean |
compress() |
ImageInputStream |
createImageInputStream(int frameIndex) |
void |
dispose() |
private void |
extractEmbeddedOverlays(int frameIndex,
BufferedImage bi) |
long |
getEstimatedNeededMemory() |
private boolean |
needToExtractEmbeddedOverlays() |
BufferedImage |
readFrame(int frameIndex) |
private void |
readFully(short[] data) |
private void |
verify(ImageInputStream iis,
int index) |
private final Attributes dataset
private final String compressTsuid
private VR.Holder pixeldataVR
private final TransferSyntaxType tsType
private ImageWriter compressor
private ImageReader verifier
private PatchJPEGLS compressPatchJPEGLS
private ImageWriteParam compressParam
private ImageInputStream iis
private IOException ex
private int[] embeddedOverlays
private int maxPixelValueError
private int avgPixelValueBlockSize
private BufferedImage decompressedImageForVerification
private ImageParams imageParams
private Decompressor decompressor
private BufferedImage uncompressedImage
private ImageReadParam verifyParam
public Compressor(Attributes dataset, String tsuid, String compressTsuid, Property... compressParams)
public boolean compress() throws IOException
IOException
private boolean needToExtractEmbeddedOverlays()
public void close()
close
in interface Closeable
close
in interface AutoCloseable
public void dispose()
public BufferedImage readFrame(int frameIndex) throws IOException
IOException
private void verify(ImageInputStream iis, int index) throws IOException
IOException
private void extractEmbeddedOverlays(int frameIndex, BufferedImage bi)
private void readFully(short[] data) throws IOException
IOException
public ImageInputStream createImageInputStream(int frameIndex) throws IOException
IOException
public long getEstimatedNeededMemory()
Copyright © 2017 dcm4che.org. All rights reserved.