@Test (enabled=false, groups = {"11-06-i-links"}, dependsOnGroups = {"11-06-i-image", "11-06-i-lightsource"}) public void testChannel0ToLightsourceLinkage() { Assert.assertNotNull(channel0); LightSourceSettings lightsourceSettings = channel0.getLightSourceSettings(); Assert.assertNotNull(lightsourceSettings); Assert.assertNotNull(lightsourceSettings.getLightSource()); Assert.assertEquals(lightsource0, lightsourceSettings.getLightSource()); }
public PercentFraction getChannelLightSourceSettingsAttenuation(int imageIndex, int channelIndex) { // Parents: {u'Channel': {u'Pixels': {u'Image': {u'OME': None}}}, u'MicrobeamManipulation': {u'Experiment': {u'OME': None}}} // Attenuation is not a reference return root.getImage(imageIndex).getPixels().getChannel(channelIndex).getLightSourceSettings().getAttenuation(); }
public Length getChannelLightSourceSettingsWavelength(int imageIndex, int channelIndex) { // Parents: {u'Channel': {u'Pixels': {u'Image': {u'OME': None}}}, u'MicrobeamManipulation': {u'Experiment': {u'OME': None}}} // Wavelength is not a reference return root.getImage(imageIndex).getPixels().getChannel(channelIndex).getLightSourceSettings().getWavelength(); }
public String getChannelLightSourceSettingsID(int imageIndex, int channelIndex) { // Parents: {u'Channel': {u'Pixels': {u'Image': {u'OME': None}}}, u'MicrobeamManipulation': {u'Experiment': {u'OME': None}}} // ID is not a reference return root.getImage(imageIndex).getPixels().getChannel(channelIndex).getLightSourceSettings().getID(); }
@Test (groups = {"11-06-i-links"}, dependsOnGroups = {"11-06-i-image", "11-06-i-lightsource"}) public void testChannel0ToLightsourceSettings() { Assert.assertNotNull(channel0); LightSourceSettings lightsourceSettings = channel0.getLightSourceSettings(); Assert.assertNotNull(lightsourceSettings); Assert.assertEquals(ref.Image0LightSourceSettings0Attenuation, lightsourceSettings.getAttenuation()); Assert.assertEquals(ref.Image0LightSourceSettings0Wavelength, lightsourceSettings.getWavelength()); Assert.assertNull(lightsourceSettings.getMicrobeamManipulation()); }
public String getChannelLightSourceSettingsID(int imageIndex, int channelIndex) { // Parents: {u'Channel': {u'Pixels': {u'Image': {u'OME': None}}}, u'MicrobeamManipulation': {u'Experiment': {u'OME': None}}} // ID is not a reference return root.getImage(imageIndex).getPixels().getChannel(channelIndex).getLightSourceSettings().getID(); }
public Length getChannelLightSourceSettingsWavelength(int imageIndex, int channelIndex) { // Parents: {u'Channel': {u'Pixels': {u'Image': {u'OME': None}}}, u'MicrobeamManipulation': {u'Experiment': {u'OME': None}}} // Wavelength is not a reference return root.getImage(imageIndex).getPixels().getChannel(channelIndex).getLightSourceSettings().getWavelength(); }
public PercentFraction getChannelLightSourceSettingsAttenuation(int imageIndex, int channelIndex) { // Parents: {u'Channel': {u'Pixels': {u'Image': {u'OME': None}}}, u'MicrobeamManipulation': {u'Experiment': {u'OME': None}}} // Attenuation is not a reference return root.getImage(imageIndex).getPixels().getChannel(channelIndex).getLightSourceSettings().getAttenuation(); }
@Test (groups = {"11-06-u-image"}, dependsOnMethods = {"testPixels0"}) public void testChannel1() { Assert.assertNotNull(pixels0); channel1 = pixels0.getChannel(1); Assert.assertEquals(ref.Image0Pixels0_0Channel1AcquisitionMode, channel1.getAcquisitionMode()); Assert.assertEquals(ref.Image0Pixels0_0Channel1Color, channel1.getColor()); Assert.assertNull(channel1.getContrastMethod()); Assert.assertNull(channel1.getDetectorSettings()); Assert.assertNull(channel1.getEmissionWavelength()); Assert.assertNull(channel1.getExcitationWavelength()); Assert.assertNull(channel1.getFluor()); Assert.assertNull(channel1.getIlluminationType()); Assert.assertNull(channel1.getLightPath()); Assert.assertNull(channel1.getLightSourceSettings()); Assert.assertNull(channel1.getName()); Assert.assertNull(channel1.getNDFilter()); Assert.assertNull(channel1.getPinholeSize()); Assert.assertNull(channel1.getPockelCellSetting()); Assert.assertNull(channel1.getSamplesPerPixel()); } @Test (groups = {"11-06-u-image"}, dependsOnMethods = {"testPixels0"})
@Test (groups = {"11-06-u-image"}, dependsOnMethods = {"testPixels0"}) public void testChannel0() { Assert.assertNotNull(pixels0); channel0 = pixels0.getChannel(0); Assert.assertEquals(ref.Image0Pixels0_0Channel0AcquisitionMode, channel0.getAcquisitionMode()); Assert.assertEquals(ref.Image0Pixels0_0Channel0Color, channel0.getColor()); Assert.assertNull(channel0.getContrastMethod()); Assert.assertNull(channel0.getDetectorSettings()); Assert.assertNull(channel0.getEmissionWavelength()); Assert.assertNull(channel0.getExcitationWavelength()); Assert.assertNull(channel0.getFluor()); Assert.assertNull(channel0.getIlluminationType()); Assert.assertNull(channel0.getLightPath()); Assert.assertNull(channel0.getLightSourceSettings()); Assert.assertNull(channel0.getName()); Assert.assertNull(channel0.getNDFilter()); Assert.assertNull(channel0.getPinholeSize()); Assert.assertNull(channel0.getPockelCellSetting()); Assert.assertNull(channel0.getSamplesPerPixel()); }
@Test (groups = {"11-06-u-image"}, dependsOnMethods = {"testPixels0"}) public void testChannel2() { Assert.assertNotNull(pixels0); channel2 = pixels0.getChannel(2); Assert.assertEquals(ref.Image0Pixels0_0Channel2AcquisitionMode, channel2.getAcquisitionMode()); Assert.assertEquals(ref.Image0Pixels0_0Channel2Color, channel2.getColor()); Assert.assertNull(channel2.getContrastMethod()); Assert.assertNull(channel2.getDetectorSettings()); Assert.assertNull(channel2.getEmissionWavelength()); Assert.assertNull(channel2.getExcitationWavelength()); Assert.assertNull(channel2.getFluor()); Assert.assertNull(channel2.getIlluminationType()); Assert.assertNull(channel2.getLightPath()); Assert.assertNull(channel2.getLightSourceSettings()); Assert.assertNull(channel2.getName()); Assert.assertNull(channel2.getNDFilter()); Assert.assertNull(channel2.getPinholeSize()); Assert.assertNull(channel2.getPockelCellSetting()); Assert.assertNull(channel2.getSamplesPerPixel()); }
@Test (groups = {"11-06-i-image"}, dependsOnMethods = {"testPixels0"}) public void testChannel0() { Assert.assertNotNull(pixels0); channel0 = pixels0.getChannel(0); Assert.assertEquals(ref.Image0Pixels0_0Channel0Color, channel0.getColor()); Assert.assertNull(channel0.getContrastMethod()); Assert.assertNull(channel0.getEmissionWavelength()); Assert.assertNull(channel0.getExcitationWavelength()); Assert.assertNull(channel0.getFluor()); Assert.assertNull(channel0.getIlluminationType()); Assert.assertNull(channel0.getName()); Assert.assertNull(channel0.getNDFilter()); Assert.assertNull(channel0.getPinholeSize()); Assert.assertNull(channel0.getPockelCellSetting()); Assert.assertNull(channel0.getSamplesPerPixel()); Assert.assertNull(channel0.getAcquisitionMode()); Assert.assertNotNull(channel0.getLightPath()); Assert.assertNotNull(channel0.getLightSourceSettings()); Assert.assertNotNull(channel0.getDetectorSettings()); }
public void setChannelLightSourceSettingsAttenuation(PercentFraction attenuation, int imageIndex, int channelIndex) { // Parents: {u'Channel': {u'Pixels': {u'Image': {u'OME': None}}}, u'MicrobeamManipulation': {u'Experiment': {u'OME': None}}} // Attenuation 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); if (o3.getLightSourceSettings() == null) { o3.setLightSourceSettings(new LightSourceSettings()); } LightSourceSettings o4 = o3.getLightSourceSettings(); o4.setAttenuation(attenuation); }
public void setChannelLightSourceSettingsAttenuation(PercentFraction attenuation, int imageIndex, int channelIndex) { // Parents: {u'Channel': {u'Pixels': {u'Image': {u'OME': None}}}, u'MicrobeamManipulation': {u'Experiment': {u'OME': None}}} // Attenuation 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); if (o3.getLightSourceSettings() == null) { o3.setLightSourceSettings(new LightSourceSettings()); } LightSourceSettings o4 = o3.getLightSourceSettings(); o4.setAttenuation(attenuation); }
public void setChannelLightSourceSettingsWavelength(Length wavelength, int imageIndex, int channelIndex) { // Parents: {u'Channel': {u'Pixels': {u'Image': {u'OME': None}}}, u'MicrobeamManipulation': {u'Experiment': {u'OME': None}}} // Wavelength 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); if (o3.getLightSourceSettings() == null) { o3.setLightSourceSettings(new LightSourceSettings()); } LightSourceSettings o4 = o3.getLightSourceSettings(); o4.setWavelength(wavelength); }
public void setChannelLightSourceSettingsWavelength(Length wavelength, int imageIndex, int channelIndex) { // Parents: {u'Channel': {u'Pixels': {u'Image': {u'OME': None}}}, u'MicrobeamManipulation': {u'Experiment': {u'OME': None}}} // Wavelength 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); if (o3.getLightSourceSettings() == null) { o3.setLightSourceSettings(new LightSourceSettings()); } LightSourceSettings o4 = o3.getLightSourceSettings(); o4.setWavelength(wavelength); }
public void setChannelLightSourceSettingsID(String id, int imageIndex, int channelIndex) { // Parents: {u'Channel': {u'Pixels': {u'Image': {u'OME': None}}}, u'MicrobeamManipulation': {u'Experiment': {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); if (o3.getLightSourceSettings() == null) { o3.setLightSourceSettings(new LightSourceSettings()); } LightSourceSettings o4 = o3.getLightSourceSettings(); model.addModelObject(id, o4); o4.setID(id); }
public void setChannelLightSourceSettingsID(String id, int imageIndex, int channelIndex) { // Parents: {u'Channel': {u'Pixels': {u'Image': {u'OME': None}}}, u'MicrobeamManipulation': {u'Experiment': {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); if (o3.getLightSourceSettings() == null) { o3.setLightSourceSettings(new LightSourceSettings()); } LightSourceSettings o4 = o3.getLightSourceSettings(); model.addModelObject(id, o4); o4.setID(id); }
@Test public void testGenericExcitationSourceMapContent() throws Exception { DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); DocumentBuilder parser = factory.newDocumentBuilder(); Document document = parser.newDocument(); // Produce a valid OME DOM element hierarchy Element root = ome.asXMLElement(document); SPWModelMock.postProcess(root, document, false); OMEModel model = new OMEModelImpl(); ome = new OME(document.getDocumentElement(), model); model.resolveReferences(); assertNotNull(ome); assertEquals(ome.getImage(0).getPixels().getChannel(0).getLightSourceSettings().getID(), "LightSource:0"); assertNotNull(ome.getInstrument(0).getLightSource(0)); GenericExcitationSource geSource = (GenericExcitationSource) ome.getInstrument(0).getLightSource(0); List<MapPair> dataMap = geSource.getMap(); assertEquals(6, dataMap.size()); assertPair(dataMap, 0, "a", "1"); assertPair(dataMap, 1, "d", "2"); assertPair(dataMap, 2, "c", "3"); assertPair(dataMap, 3, "b", "4"); assertPair(dataMap, 4, "e", "5"); assertPair(dataMap, 5, "c", "6"); }