Search in sources :

Example 11 with CodecOptions

use of loci.formats.codec.CodecOptions in project bioformats by openmicroscopy.

the class TiffCompressionCompressTest method testJPEG_2000.

@Test
public void testJPEG_2000() throws FormatException, IOException {
    TiffCompression compression = TiffCompression.JPEG_2000;
    CodecOptions options = compression.getCompressionCodecOptions(ifd);
    byte[] compressed = compression.compress(data, options);
    assertNotNull(compressed);
}
Also used : CodecOptions(loci.formats.codec.CodecOptions) JPEG2000CodecOptions(loci.formats.codec.JPEG2000CodecOptions) TiffCompression(loci.formats.tiff.TiffCompression) Test(org.testng.annotations.Test)

Example 12 with CodecOptions

use of loci.formats.codec.CodecOptions in project bioformats by openmicroscopy.

the class TiffCompressionCompressTest method testLURAWAVE.

@Test(expectedExceptions = { FormatException.class })
public void testLURAWAVE() throws FormatException, IOException {
    TiffCompression compression = TiffCompression.LURAWAVE;
    CodecOptions options = compression.getCompressionCodecOptions(ifd);
    compression.compress(data, options);
}
Also used : CodecOptions(loci.formats.codec.CodecOptions) JPEG2000CodecOptions(loci.formats.codec.JPEG2000CodecOptions) TiffCompression(loci.formats.tiff.TiffCompression) Test(org.testng.annotations.Test)

Example 13 with CodecOptions

use of loci.formats.codec.CodecOptions in project bioformats by openmicroscopy.

the class TiffCompressionCompressTest method testGROUP_3_FAX.

@Test(expectedExceptions = { FormatException.class })
public void testGROUP_3_FAX() throws FormatException, IOException {
    TiffCompression compression = TiffCompression.GROUP_3_FAX;
    CodecOptions options = compression.getCompressionCodecOptions(ifd);
    compression.compress(data, options);
}
Also used : CodecOptions(loci.formats.codec.CodecOptions) JPEG2000CodecOptions(loci.formats.codec.JPEG2000CodecOptions) TiffCompression(loci.formats.tiff.TiffCompression) Test(org.testng.annotations.Test)

Example 14 with CodecOptions

use of loci.formats.codec.CodecOptions in project bioformats by openmicroscopy.

the class TiffCompressionCompressTest method testPACK_BITS.

@Test(expectedExceptions = { FormatException.class })
public void testPACK_BITS() throws FormatException, IOException {
    TiffCompression compression = TiffCompression.PACK_BITS;
    CodecOptions options = compression.getCompressionCodecOptions(ifd);
    compression.compress(data, options);
}
Also used : CodecOptions(loci.formats.codec.CodecOptions) JPEG2000CodecOptions(loci.formats.codec.JPEG2000CodecOptions) TiffCompression(loci.formats.tiff.TiffCompression) Test(org.testng.annotations.Test)

Example 15 with CodecOptions

use of loci.formats.codec.CodecOptions in project bioformats by openmicroscopy.

the class TiffCompressionCompressTest method testCCITT_1D.

@Test(expectedExceptions = { FormatException.class })
public void testCCITT_1D() throws FormatException, IOException {
    TiffCompression compression = TiffCompression.CCITT_1D;
    CodecOptions options = compression.getCompressionCodecOptions(ifd);
    compression.compress(data, options);
}
Also used : CodecOptions(loci.formats.codec.CodecOptions) JPEG2000CodecOptions(loci.formats.codec.JPEG2000CodecOptions) TiffCompression(loci.formats.tiff.TiffCompression) Test(org.testng.annotations.Test)

Aggregations

CodecOptions (loci.formats.codec.CodecOptions)37 JPEG2000CodecOptions (loci.formats.codec.JPEG2000CodecOptions)18 TiffCompression (loci.formats.tiff.TiffCompression)18 Test (org.testng.annotations.Test)18 RandomAccessInputStream (loci.common.RandomAccessInputStream)9 JPEGCodec (loci.formats.codec.JPEGCodec)8 PackbitsCodec (loci.formats.codec.PackbitsCodec)6 ByteArrayHandle (loci.common.ByteArrayHandle)5 ZlibCodec (loci.formats.codec.ZlibCodec)5 UnsupportedCompressionException (loci.formats.UnsupportedCompressionException)4 JPEG2000Codec (loci.formats.codec.JPEG2000Codec)4 IOException (java.io.IOException)3 CoreMetadata (loci.formats.CoreMetadata)3 Codec (loci.formats.codec.Codec)3 FormatException (loci.formats.FormatException)2 IFormatReader (loci.formats.IFormatReader)2 MetadataStore (loci.formats.meta.MetadataStore)2 Length (ome.units.quantity.Length)2 ByteArrayInputStream (java.io.ByteArrayInputStream)1 ByteArrayOutputStream (java.io.ByteArrayOutputStream)1