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;
}
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());
}
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());
}
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());
}
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);
}
Aggregations