setID(String.valueOf( element.getAttribute("ID")));
setID(String.valueOf( element.getAttribute("ID")));
pixels.setID("Pixels:0"); Channel channel = new Channel(); channel.setID("Channel:0"); LightSourceSettings settings = new LightSourceSettings(); settings.setID("LightSource:0");
/** * Creates a channel. * * @param index The index in the file. * @return See above. */ public Channel createChannel(int index) { Channel channel = new Channel(); channel.setID("Channel:"+index); channel.setAcquisitionMode(AcquisitionMode.FLUORESCENCELIFETIME); int argb = DEFAULT_COLOR.getRGB(); int rgba = (argb << 8) | (argb >>> (32-8)); channel.setColor(new ome.xml.model.primitives.Color(rgba)); channel.setName("Name"); channel.setIlluminationType(IlluminationType.OBLIQUE); channel.setPinholeSize(new Length(0.5, UNITS.MICROMETER)); channel.setContrastMethod(ContrastMethod.BRIGHTFIELD); PositiveFloat emWave = new PositiveFloat(300.3); channel.setEmissionWavelength(new Length(emWave.getValue(), UNITS.NANOMETER)); PositiveFloat exWave = new PositiveFloat(400.3); channel.setExcitationWavelength(new Length(exWave.getValue(), UNITS.NANOMETER)); channel.setFluor("Fluor"); channel.setNDFilter(1.0); channel.setPockelCellSetting(0); return channel; }
public void setChannelID(String id, int imageIndex, int channelIndex) { // Parents: {u'Pixels': {u'Image': {u'OME': None}}} // ID is not a reference OME o0 = root; if (o0.sizeOfImageList() == imageIndex) { o0.addImage(new Image()); } Image o1 = o0.getImage(imageIndex); if (o1.getPixels() == null) { o1.setPixels(new Pixels()); } Pixels o2 = o1.getPixels(); if (o2.sizeOfChannelList() == channelIndex) { o2.addChannel(new Channel()); } Channel o3 = o2.getChannel(channelIndex); model.addModelObject(id, o3); o3.setID(id); if (o3.getLightPath() == null) { o3.setLightPath(new LightPath()); } }
public void setChannelID(String id, int imageIndex, int channelIndex) { // Parents: {u'Pixels': {u'Image': {u'OME': None}}} // ID is not a reference OME o0 = root; if (o0.sizeOfImageList() == imageIndex) { o0.addImage(new Image()); } Image o1 = o0.getImage(imageIndex); if (o1.getPixels() == null) { o1.setPixels(new Pixels()); } Pixels o2 = o1.getPixels(); if (o2.sizeOfChannelList() == channelIndex) { o2.addChannel(new Channel()); } Channel o3 = o2.getChannel(channelIndex); model.addModelObject(id, o3); o3.setID(id); if (o3.getLightPath() == null) { o3.setLightPath(new LightPath()); } }
@BeforeClass public void setUp() throws Exception { Instrument instrument = new Instrument(); instrument.setID("Instrument:0"); // Add a Laser with an Arc pump Laser laser = new Laser(); laser.setID("Laser:0"); Arc pump = new Arc(); pump.setID("Arc:0"); laser.linkPump(pump); instrument.addLightSource(laser); instrument.addLightSource(pump); ome.addInstrument(instrument); // Add an Image/Pixels with a LightSourceSettings reference to the Pump // on one of its channels. Image image = new Image(); image.setID("Image:0"); Pixels pixels = new Pixels(); pixels.setID("Pixels:0"); Channel channel = new Channel(); channel.setID("Channel:0"); LightSourceSettings settings = new LightSourceSettings(); settings.setID("Arc:0"); channel.setLightSourceSettings(settings); pixels.addChannel(channel); image.setPixels(pixels); ome.addImage(image); }
channel.setID("Channel:" + i); pixels.addChannel(channel);
for (int i = 0; i < SIZE_C; i++) { channel = createChannel(i); channel.setID("Channel:" + index + ":" + i); if (metadata) { if (j == n) j = 0;
channel.setID("Channel:" + i); if (i == 0) { XMLAnnotation channelAnnotation = new XMLAnnotation();
channel.setID("Channel:" + i);