Search in sources :

Example 1 with FakeImage

use of loci.formats.tools.FakeImage in project bioformats by openmicroscopy.

the class FakeReaderTest method testTwoPlates.

@Test
public void testTwoPlates() throws Exception {
    Location twoPlates = new FakeImage(mkSubd(wd, "2P.fake")).generateScreen(2, 2, 2, 2, 4);
    reader.setId(twoPlates.getAbsolutePath());
    OMEXMLMetadata metadata = reader.getOmeXmlMetadata();
    int i = reader.getImageCount();
    while (i >= 0) {
        assertEquals(metadata.getChannelCount(i--), reader.getSizeC());
    }
}
Also used : FakeImage(loci.formats.tools.FakeImage) OMEXMLMetadata(loci.formats.ome.OMEXMLMetadata) Location(loci.common.Location) Test(org.testng.annotations.Test)

Example 2 with FakeImage

use of loci.formats.tools.FakeImage in project bioformats by openmicroscopy.

the class FakeReaderTest method testTwoFields.

@Test
public void testTwoFields() throws Exception {
    Location twoFields = new FakeImage(mkSubd(wd, "2F.fake")).generateScreen(1, 1, 1, 1, 2);
    reader.setId(twoFields.getAbsolutePath());
    assertEquals(reader.getSeriesCount(), 2);
}
Also used : FakeImage(loci.formats.tools.FakeImage) Location(loci.common.Location) Test(org.testng.annotations.Test)

Example 3 with FakeImage

use of loci.formats.tools.FakeImage in project bioformats by openmicroscopy.

the class FakeReaderTest method testOneWell.

@Test
public void testOneWell() throws Exception {
    Location oneWell = new FakeImage(mkSubd(wd, "1W.fake")).generateScreen(1, 1, 1, 1, 1);
    assertTrue(reader.isSingleFile(oneWell.getAbsolutePath()));
    assertTrue(reader.isThisType(oneWell.getAbsolutePath()));
    reader.setId(oneWell.getAbsolutePath());
    assertEquals(reader.getOmeXmlMetadata().getWellCount(0), 1);
    assertEquals(reader.getUsedFiles().length, 1);
    assertEquals(reader.getSeriesUsedFiles(false).length, 1);
    assertEquals(reader.getSeriesUsedFiles(true).length, 0);
}
Also used : FakeImage(loci.formats.tools.FakeImage) Location(loci.common.Location) Test(org.testng.annotations.Test)

Example 4 with FakeImage

use of loci.formats.tools.FakeImage in project bioformats by openmicroscopy.

the class FakeReaderTest method testTwoWells.

@Test
public void testTwoWells() throws Exception {
    Location twoWells = new FakeImage(mkSubd(wd, "2W.fake")).generateScreen(1, 1, 1, 2, 1);
    assertFalse(reader.isSingleFile(twoWells.getAbsolutePath()));
    assertTrue(reader.isThisType(twoWells.getAbsolutePath()));
    reader.setId(twoWells.getAbsolutePath());
    assertEquals(reader.getOmeXmlMetadata().getWellCount(0), 2);
    assertEquals(reader.getUsedFiles().length, 2);
    assertEquals(reader.getSeriesUsedFiles(false).length, 2);
    assertEquals(reader.getSeriesUsedFiles(true).length, 0);
}
Also used : FakeImage(loci.formats.tools.FakeImage) Location(loci.common.Location) Test(org.testng.annotations.Test)

Aggregations

Location (loci.common.Location)4 FakeImage (loci.formats.tools.FakeImage)4 Test (org.testng.annotations.Test)4 OMEXMLMetadata (loci.formats.ome.OMEXMLMetadata)1