Search in sources :

Example 6 with DynamicMetadataOptions

use of loci.formats.in.DynamicMetadataOptions in project bioformats by openmicroscopy.

the class ImageReaderTest method testOptionsExplicit.

@Test
public void testOptionsExplicit() throws Exception {
    DynamicMetadataOptions opt = new DynamicMetadataOptions();
    opt.set(KEY, VALUE);
    ImageReader reader = new ImageReader();
    reader.setMetadataOptions(opt);
    reader.setId("test.fake");
    MetadataOptions rOpt = reader.getReader().getMetadataOptions();
    assertTrue(rOpt instanceof DynamicMetadataOptions);
    String v = ((DynamicMetadataOptions) rOpt).get(KEY);
    assertNotNull(v);
    assertEquals(v, VALUE);
    reader.close();
}
Also used : MetadataOptions(loci.formats.in.MetadataOptions) DynamicMetadataOptions(loci.formats.in.DynamicMetadataOptions) DynamicMetadataOptions(loci.formats.in.DynamicMetadataOptions) ImageReader(loci.formats.ImageReader) Test(org.testng.annotations.Test)

Aggregations

DynamicMetadataOptions (loci.formats.in.DynamicMetadataOptions)6 Test (org.testng.annotations.Test)4 MetadataOptions (loci.formats.in.MetadataOptions)3 ImageReader (loci.formats.ImageReader)2 File (java.io.File)1 Path (java.nio.file.Path)1 ClassList (loci.formats.ClassList)1 FileStitcher (loci.formats.FileStitcher)1 IFormatReader (loci.formats.IFormatReader)1 MetadataLevel (loci.formats.in.MetadataLevel)1 ND2Reader (loci.formats.in.ND2Reader)1 NativeND2Reader (loci.formats.in.NativeND2Reader)1 OMETiffReader (loci.formats.in.OMETiffReader)1 PictReader (loci.formats.in.PictReader)1 QTReader (loci.formats.in.QTReader)1 SDTReader (loci.formats.in.SDTReader)1 TiffDelegateReader (loci.formats.in.TiffDelegateReader)1 OMETiffWriter (loci.formats.out.OMETiffWriter)1