Search in sources :

Example 1 with OMEXMLMetadataImpl

use of loci.formats.ome.OMEXMLMetadataImpl in project bioformats by openmicroscopy.

the class OMEXMLServiceImpl method createOMEXMLMetadata.

/**
 * @see OMEXMLService#createOMEXMLMetadata(java.lang.String, java.lang.String)
 */
@Override
public OMEXMLMetadata createOMEXMLMetadata(String xml, String version) throws ServiceException {
    if (xml != null) {
        xml = XMLTools.sanitizeXML(xml);
    }
    OMEXMLMetadataRoot ome = xml == null ? null : createRoot(transformToLatestVersion(xml));
    OMEXMLMetadata meta = new OMEXMLMetadataImpl();
    if (ome != null)
        meta.setRoot(ome);
    return meta;
}
Also used : OMEXMLMetadata(loci.formats.ome.OMEXMLMetadata) OMEXMLMetadataRoot(ome.xml.meta.OMEXMLMetadataRoot) OMEXMLMetadataImpl(loci.formats.ome.OMEXMLMetadataImpl)

Example 2 with OMEXMLMetadataImpl

use of loci.formats.ome.OMEXMLMetadataImpl in project bioformats by openmicroscopy.

the class SPWModelReaderTest method testSetId.

@Test
public void testSetId() throws Exception {
    reader = new MinMaxCalculator(new ChannelSeparator(new ChannelFiller(new ImageReader())));
    metadata = new OMEXMLMetadataImpl();
    reader.setMetadataStore(metadata);
    reader.setId(temporaryFile.getAbsolutePath());
}
Also used : MinMaxCalculator(loci.formats.MinMaxCalculator) ChannelFiller(loci.formats.ChannelFiller) ImageReader(loci.formats.ImageReader) ChannelSeparator(loci.formats.ChannelSeparator) OMEXMLMetadataImpl(loci.formats.ome.OMEXMLMetadataImpl) Test(org.testng.annotations.Test)

Example 3 with OMEXMLMetadataImpl

use of loci.formats.ome.OMEXMLMetadataImpl in project bioformats by openmicroscopy.

the class SPWModelReaderTest method testSetIdWithNoLightSources.

@Test
public void testSetIdWithNoLightSources() throws Exception {
    readerWithNoLightSources = new MinMaxCalculator(new ChannelSeparator(new ChannelFiller(new ImageReader())));
    metadataWithNoLightSources = new OMEXMLMetadataImpl();
    readerWithNoLightSources.setMetadataStore(metadataWithNoLightSources);
    readerWithNoLightSources.setId(temporaryFileWithNoLightSources.getAbsolutePath());
}
Also used : MinMaxCalculator(loci.formats.MinMaxCalculator) ChannelFiller(loci.formats.ChannelFiller) ImageReader(loci.formats.ImageReader) ChannelSeparator(loci.formats.ChannelSeparator) OMEXMLMetadataImpl(loci.formats.ome.OMEXMLMetadataImpl) Test(org.testng.annotations.Test)

Example 4 with OMEXMLMetadataImpl

use of loci.formats.ome.OMEXMLMetadataImpl in project bioformats by openmicroscopy.

the class BaseModelNoBinDataReaderTest method testSetId.

@Test
public void testSetId() throws Exception {
    reader = new MinMaxCalculator(new ChannelSeparator(new ChannelFiller(new ImageReader())));
    metadata = new OMEXMLMetadataImpl();
    reader.setMetadataStore(metadata);
    reader.setId(temporaryFile.getAbsolutePath());
}
Also used : MinMaxCalculator(loci.formats.MinMaxCalculator) ChannelFiller(loci.formats.ChannelFiller) ImageReader(loci.formats.ImageReader) ChannelSeparator(loci.formats.ChannelSeparator) OMEXMLMetadataImpl(loci.formats.ome.OMEXMLMetadataImpl) Test(org.testng.annotations.Test)

Example 5 with OMEXMLMetadataImpl

use of loci.formats.ome.OMEXMLMetadataImpl in project bioformats by openmicroscopy.

the class GetLightSourceTypeTest method setUp.

@BeforeClass
public void setUp() throws Exception {
    metadata = new OMEXMLMetadataImpl();
    OMEXMLMetadataRoot ome = new OMEXMLMetadataRoot();
    Instrument instrument = new Instrument();
    instrument.addLightSource(new Arc());
    instrument.addLightSource(new Filament());
    instrument.addLightSource(new Laser());
    instrument.addLightSource(new LightEmittingDiode());
    ome.addInstrument(instrument);
    metadata.setRoot(ome);
}
Also used : LightEmittingDiode(ome.xml.model.LightEmittingDiode) Arc(ome.xml.model.Arc) Filament(ome.xml.model.Filament) OMEXMLMetadataRoot(ome.xml.meta.OMEXMLMetadataRoot) Laser(ome.xml.model.Laser) Instrument(ome.xml.model.Instrument) OMEXMLMetadataImpl(loci.formats.ome.OMEXMLMetadataImpl) BeforeClass(org.testng.annotations.BeforeClass)

Aggregations

OMEXMLMetadataImpl (loci.formats.ome.OMEXMLMetadataImpl)7 Test (org.testng.annotations.Test)5 ChannelFiller (loci.formats.ChannelFiller)4 ChannelSeparator (loci.formats.ChannelSeparator)4 ImageReader (loci.formats.ImageReader)4 MinMaxCalculator (loci.formats.MinMaxCalculator)4 OMEXMLMetadataRoot (ome.xml.meta.OMEXMLMetadataRoot)2 OMEXMLMetadata (loci.formats.ome.OMEXMLMetadata)1 Arc (ome.xml.model.Arc)1 Filament (ome.xml.model.Filament)1 Instrument (ome.xml.model.Instrument)1 Laser (ome.xml.model.Laser)1 LightEmittingDiode (ome.xml.model.LightEmittingDiode)1 BeforeClass (org.testng.annotations.BeforeClass)1