Search in sources :

Example 31 with TiffCompression

use of loci.formats.tiff.TiffCompression in project bioformats by openmicroscopy.

the class TiffCompressionCompressTest method testNIKON.

@Test(expectedExceptions = { FormatException.class })
public void testNIKON() throws FormatException, IOException {
    TiffCompression compression = TiffCompression.NIKON;
    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 32 with TiffCompression

use of loci.formats.tiff.TiffCompression in project bioformats by openmicroscopy.

the class TiffCompressionCompressTest method testALT_JPEG.

@Test
public void testALT_JPEG() throws FormatException, IOException {
    TiffCompression compression = TiffCompression.ALT_JPEG;
    ifd.put(IFD.BITS_PER_SAMPLE, new int[] { 8 });
    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 33 with TiffCompression

use of loci.formats.tiff.TiffCompression in project bioformats by openmicroscopy.

the class TiffCompressionCompressTest method testPROPRIETARY_DEFLATE.

@Test
public void testPROPRIETARY_DEFLATE() throws FormatException, IOException {
    TiffCompression compression = TiffCompression.PROPRIETARY_DEFLATE;
    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)

Aggregations

TiffCompression (loci.formats.tiff.TiffCompression)33 Test (org.testng.annotations.Test)31 CodecOptions (loci.formats.codec.CodecOptions)18 JPEG2000CodecOptions (loci.formats.codec.JPEG2000CodecOptions)18 NikonCodecOptions (loci.formats.codec.NikonCodecOptions)1 IFD (loci.formats.tiff.IFD)1 IFDList (loci.formats.tiff.IFDList)1 PhotoInterp (loci.formats.tiff.PhotoInterp)1 TiffRational (loci.formats.tiff.TiffRational)1