public int getChannelCount(int imageIndex) { // Parents: {u'Pixels': {u'Image': {u'OME': None}}} // Channel is not a reference return root.getImage(imageIndex).getPixels().sizeOfChannelList(); }
public int getChannelCount(int imageIndex) { // Parents: {u'Pixels': {u'Image': {u'OME': None}}} // Channel is not a reference return root.getImage(imageIndex).getPixels().sizeOfChannelList(); }
@Test (groups = {"11-06-i-image"}, dependsOnMethods = {"testImage0Name"}) public void testPixels0() { Assert.assertNotNull(image0); pixels0 = image0.getPixels(); Assert.assertEquals(1, pixels0.sizeOfBinDataList()); Assert.assertEquals(1, pixels0.sizeOfChannelList()); Assert.assertEquals(0, pixels0.sizeOfPlaneList()); Assert.assertEquals(0, pixels0.sizeOfTiffDataList()); Assert.assertEquals(ref.Image0Pixels0_0DimensionOrder, pixels0.getDimensionOrder()); Assert.assertEquals(ref.Image0Pixels0_0PhysicalSizeX, pixels0.getPhysicalSizeX()); Assert.assertEquals(ref.Image0Pixels0_0PhysicalSizeY, pixels0.getPhysicalSizeY()); Assert.assertEquals(ref.Image0Pixels0_0Type, pixels0.getType()); Assert.assertEquals(ref.Image0Pixels0_0SizeC, pixels0.getSizeC()); Assert.assertEquals(ref.Image0Pixels0_0SizeT, pixels0.getSizeT()); Assert.assertEquals(ref.Image0Pixels0_0SizeX, pixels0.getSizeX()); Assert.assertEquals(ref.Image0Pixels0_0SizeY, pixels0.getSizeY()); Assert.assertEquals(ref.Image0Pixels0_0SizeZ, pixels0.getSizeZ()); Assert.assertNull(pixels0.getMetadataOnly()); Assert.assertNull(pixels0.getPhysicalSizeZ()); Assert.assertNull(pixels0.getTimeIncrement()); }
@Test (groups = {"11-06-u-image"}, dependsOnMethods = {"testImage0Name"}) public void testPixels0() { Assert.assertNotNull(image0); pixels0 = image0.getPixels(); Assert.assertEquals(3, pixels0.sizeOfBinDataList()); Assert.assertEquals(3, pixels0.sizeOfChannelList()); Assert.assertEquals(0, pixels0.sizeOfPlaneList()); Assert.assertEquals(0, pixels0.sizeOfTiffDataList()); Assert.assertEquals(ref.Image0Pixels0_0DimensionOrder, pixels0.getDimensionOrder()); Assert.assertEquals(ref.Image0Pixels0_0PhysicalSizeX, pixels0.getPhysicalSizeX()); Assert.assertEquals(ref.Image0Pixels0_0PhysicalSizeY, pixels0.getPhysicalSizeY()); Assert.assertEquals(ref.Image0Pixels0_0Type, pixels0.getType()); Assert.assertEquals(ref.Image0Pixels0_0SizeC, pixels0.getSizeC()); Assert.assertEquals(ref.Image0Pixels0_0SizeT, pixels0.getSizeT()); Assert.assertEquals(ref.Image0Pixels0_0SizeX, pixels0.getSizeX()); Assert.assertEquals(ref.Image0Pixels0_0SizeY, pixels0.getSizeY()); Assert.assertEquals(ref.Image0Pixels0_0SizeZ, pixels0.getSizeZ()); Assert.assertNull(pixels0.getMetadataOnly()); Assert.assertNull(pixels0.getPhysicalSizeZ()); Assert.assertNull(pixels0.getTimeIncrement()); }
@Test(dependsOnMethods={"testValidPixelsNode"}) public void testValidChannelNode() { Pixels pixels = ome.getImage(0).getPixels(); assertEquals(3, pixels.sizeOfChannelList()); for (Channel channel : pixels.copyChannelList()) { assertNotNull(channel.getID()); } }
@Test public void validateUpgrade() throws ServiceException { assertEquals(1, ome.sizeOfImageList()); Image image = ome.getImage(0); Pixels pixels = image.getPixels(); assertNotNull(pixels); assertEquals(1, pixels.sizeOfChannelList()); Channel channel = pixels.getChannel(0); // XSLT transform of Channel.AcquisitionMode // <map from="LaserScanningMicroscopy" to="LaserScanningConfocalMicroscopy"/> assertEquals(AcquisitionMode.LASERSCANNINGCONFOCALMICROSCOPY, channel.getAcquisitionMode()); }
public void setChannelAcquisitionMode(AcquisitionMode acquisitionMode, int imageIndex, int channelIndex) { // Parents: {u'Pixels': {u'Image': {u'OME': None}}} // AcquisitionMode 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); o3.setAcquisitionMode(acquisitionMode); }
public void setChannelNDFilter(Double ndFilter, int imageIndex, int channelIndex) { // Parents: {u'Pixels': {u'Image': {u'OME': None}}} // NDFilter 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); o3.setNDFilter(ndFilter); }
public void setChannelSamplesPerPixel(PositiveInteger samplesPerPixel, int imageIndex, int channelIndex) { // Parents: {u'Pixels': {u'Image': {u'OME': None}}} // SamplesPerPixel 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); o3.setSamplesPerPixel(samplesPerPixel); }
@Test public void testValidXMLAnnotation() throws EnumerationException { assertNotNull(ome); assertEquals(1, ome.sizeOfImageList()); Image image = ome.getImage(0); Pixels pixels = image.getPixels(); assertNotNull(pixels); assertEquals(3, pixels.sizeOfChannelList()); Channel channel = pixels.getChannel(0); assertEquals(1, channel.sizeOfLinkedAnnotationList()); Annotation annotation = channel.getLinkedAnnotation(0); assertEquals(XMLAnnotation.class, annotation.getClass()); String annotationValue = ((XMLAnnotation) annotation).getValue(); // normalize line endings if the test is run on Windows annotationValue = annotationValue.replaceAll("\r\n", "\n"); assertEquals("<TestData>\n <key>foo</key>\n\t\t\t\t\t<value>bar</value>\n </TestData>", annotationValue); }
public void setChannelPockelCellSetting(Integer pockelCellSetting, int imageIndex, int channelIndex) { // Parents: {u'Pixels': {u'Image': {u'OME': None}}} // PockelCellSetting 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); o3.setPockelCellSetting(pockelCellSetting); }
public void setChannelIlluminationType(IlluminationType illuminationType, int imageIndex, int channelIndex) { // Parents: {u'Pixels': {u'Image': {u'OME': None}}} // IlluminationType 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); o3.setIlluminationType(illuminationType); }
public void setChannelIlluminationType(IlluminationType illuminationType, int imageIndex, int channelIndex) { // Parents: {u'Pixels': {u'Image': {u'OME': None}}} // IlluminationType 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); o3.setIlluminationType(illuminationType); }
public void setChannelName(String name, int imageIndex, int channelIndex) { // Parents: {u'Pixels': {u'Image': {u'OME': None}}} // Name 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); o3.setName(name); }
public void setChannelEmissionWavelength(Length emissionWavelength, int imageIndex, int channelIndex) { // Parents: {u'Pixels': {u'Image': {u'OME': None}}} // EmissionWavelength 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); o3.setEmissionWavelength(emissionWavelength); }
public void setChannelName(String name, int imageIndex, int channelIndex) { // Parents: {u'Pixels': {u'Image': {u'OME': None}}} // Name 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); o3.setName(name); }
public void setChannelContrastMethod(ContrastMethod contrastMethod, int imageIndex, int channelIndex) { // Parents: {u'Pixels': {u'Image': {u'OME': None}}} // ContrastMethod 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); o3.setContrastMethod(contrastMethod); }
public void setChannelFluor(String fluor, int imageIndex, int channelIndex) { // Parents: {u'Pixels': {u'Image': {u'OME': None}}} // Fluor 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); o3.setFluor(fluor); }
public void setChannelPinholeSize(Length pinholeSize, int imageIndex, int channelIndex) { // Parents: {u'Pixels': {u'Image': {u'OME': None}}} // PinholeSize 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); o3.setPinholeSize(pinholeSize); }
public void setChannelAcquisitionMode(AcquisitionMode acquisitionMode, int imageIndex, int channelIndex) { // Parents: {u'Pixels': {u'Image': {u'OME': None}}} // AcquisitionMode 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); o3.setAcquisitionMode(acquisitionMode); }