@Test public void testDate() { Assert.assertNotNull(ome); Assert.assertEquals(1, ome.sizeOfImageList()); Image image = ome.getImage(0); Assert.assertNotNull(image); Assert.assertEquals(IMAGE_DATE, image.getAcquisitionDate()); } }
@Test (groups = {"11-06-i-image"}, dependsOnMethods = {"testOmeNode"}) public void testImage0Name() { Assert.assertNotNull(ome); Assert.assertEquals(1, ome.sizeOfImageList()); image0 = ome.getImage(0); Assert.assertNotNull(image0); Assert.assertEquals(ref.Image0Name, image0.getName()); }
@Test (groups = {"11-06-u-image"}, dependsOnMethods = {"testOmeNode"}) public void testImage0Name() { Assert.assertNotNull(ome); Assert.assertEquals(1, ome.sizeOfImageList()); image0 = ome.getImage(0); Assert.assertNotNull(image0); Assert.assertEquals(ref.Image0Name, image0.getName()); }
@Test public void testName() { Assert.assertNotNull(ome); Assert.assertEquals(1, ome.sizeOfImageList()); Image image = ome.getImage(0); Assert.assertNotNull(image); Assert.assertEquals(IMAGE_NAME, image.getName()); }
public void setImageDescription(String description, int imageIndex) { // Parents: {u'OME': None} // Description is not a reference OME o0 = root; if (o0.sizeOfImageList() == imageIndex) { o0.addImage(new Image()); } Image o1 = o0.getImage(imageIndex); o1.setDescription(description); }
public void setImageName(String name, int imageIndex) { // Parents: {u'OME': None} // Name is not a reference OME o0 = root; if (o0.sizeOfImageList() == imageIndex) { o0.addImage(new Image()); } Image o1 = o0.getImage(imageIndex); o1.setName(name); }
public void setImageAcquisitionDate(Timestamp acquisitionDate, int imageIndex) { // Parents: {u'OME': None} // AcquisitionDate is not a reference OME o0 = root; if (o0.sizeOfImageList() == imageIndex) { o0.addImage(new Image()); } Image o1 = o0.getImage(imageIndex); o1.setAcquisitionDate(acquisitionDate); }
public void setImageAcquisitionDate(Timestamp acquisitionDate, int imageIndex) { // Parents: {u'OME': None} // AcquisitionDate is not a reference OME o0 = root; if (o0.sizeOfImageList() == imageIndex) { o0.addImage(new Image()); } Image o1 = o0.getImage(imageIndex); o1.setAcquisitionDate(acquisitionDate); }
public void setImageName(String name, int imageIndex) { // Parents: {u'OME': None} // Name is not a reference OME o0 = root; if (o0.sizeOfImageList() == imageIndex) { o0.addImage(new Image()); } Image o1 = o0.getImage(imageIndex); o1.setName(name); }
public void setImageDescription(String description, int imageIndex) { // Parents: {u'OME': None} // Description is not a reference OME o0 = root; if (o0.sizeOfImageList() == imageIndex) { o0.addImage(new Image()); } Image o1 = o0.getImage(imageIndex); o1.setDescription(description); }
public void setImageID(String id, int imageIndex) { // Parents: {u'OME': None} // ID is not a reference OME o0 = root; if (o0.sizeOfImageList() == imageIndex) { o0.addImage(new Image()); } Image o1 = o0.getImage(imageIndex); model.addModelObject(id, o1); o1.setID(id); }
public void setImageID(String id, int imageIndex) { // Parents: {u'OME': None} // ID is not a reference OME o0 = root; if (o0.sizeOfImageList() == imageIndex) { o0.addImage(new Image()); } Image o1 = o0.getImage(imageIndex); model.addModelObject(id, o1); o1.setID(id); }
@Test public void validateUpgrade() throws ServiceException { assertEquals(1, ome.sizeOfImageList()); Image image = ome.getImage(0); Pixels pixels = image.getPixels(); assertNotNull(pixels); }
/** Sets the Map value associated with this imaging environment */ public void setImagingEnvironmentMap(List<MapPair> map, int imageIndex) { OME o0 = root; if (o0.sizeOfImageList() == imageIndex) { o0.addImage(new Image()); } Image o1 = o0.getImage(imageIndex); if (o1.getImagingEnvironment() == null) { o1.setImagingEnvironment(new ImagingEnvironment()); } ImagingEnvironment o2 = o1.getImagingEnvironment(); o2.setMap(map); }
public void setImagingEnvironmentHumidity(PercentFraction humidity, int imageIndex) { // Parents: {u'Image': {u'OME': None}} // Humidity is not a reference OME o0 = root; if (o0.sizeOfImageList() == imageIndex) { o0.addImage(new Image()); } Image o1 = o0.getImage(imageIndex); if (o1.getImagingEnvironment() == null) { o1.setImagingEnvironment(new ImagingEnvironment()); } ImagingEnvironment o2 = o1.getImagingEnvironment(); o2.setHumidity(humidity); }
public void setObjectiveSettingsCorrectionCollar(Double correctionCollar, int imageIndex) { // Parents: {u'Image': {u'OME': None}} // CorrectionCollar is not a reference OME o0 = root; if (o0.sizeOfImageList() == imageIndex) { o0.addImage(new Image()); } Image o1 = o0.getImage(imageIndex); if (o1.getObjectiveSettings() == null) { o1.setObjectiveSettings(new ObjectiveSettings()); } ObjectiveSettings o2 = o1.getObjectiveSettings(); o2.setCorrectionCollar(correctionCollar); }
public void setPixelsDimensionOrder(DimensionOrder dimensionOrder, int imageIndex) { // Parents: {u'Image': {u'OME': None}} // DimensionOrder 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(); o2.setDimensionOrder(dimensionOrder); }
@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()); }
@Test public void validateUpgrade() throws ServiceException { assertEquals(1, ome.sizeOfImageList()); Image image = ome.getImage(0); Pixels pixels = image.getPixels(); // Pixels physical sizes are restricted to positive values PositiveFloat positiveFloatValue = new PositiveFloat(10000.0); assertEquals(FormatTools.createLength(positiveFloatValue, UNITS.MICROMETER), pixels.getPhysicalSizeX()); assertEquals(FormatTools.createLength(positiveFloatValue, UNITS.MICROMETER), pixels.getPhysicalSizeY()); assertNull(pixels.getPhysicalSizeZ()); }
@Test public void validateUpgrade() throws ServiceException { assertEquals(1, ome.sizeOfImageList()); Image image = ome.getImage(0); assertNotNull(image.getAcquisitionDate()); assertEquals(1, ome.sizeOfROIList()); ROI roi = ome.getROI(0); Union union = roi.getUnion(); assertEquals(1, union.sizeOfShapeList()); Shape shape = union.getShape(0); assertTrue(shape instanceof Label); assertNotNull(shape.getText()); }