Closed dominikl closed 3 years ago
I can't compile/run the integration tests locally any longer, so I can't add any. But here's some example test code (using Image id 83221 which has some PlaneInfos):
public static void main(String[] args) throws Exception {
LoginCredentials lc = new LoginCredentials("user-3", "xxx", "merge-ci-devspace.openmicroscopy.org");
try(Gateway gw = new Gateway(new SimpleLogger())) {
ExperimenterData e = gw.connect(lc);
SecurityContext ctx = new SecurityContext(e.getGroupId());
long imageId = 83221;
BrowseFacility b = gw.getFacility(BrowseFacility.class);
ImageData img = b.getImage(ctx, imageId);
MetadataFacility mf = gw.getFacility(MetadataFacility.class);
List<PlaneInfoData> pis = mf.getPlaneInfos(ctx, img.getDefaultPixels());
for (PlaneInfoData pi : pis) {
System.out.println("c="+pi.getTheC()+" z="+pi.getTheZ()+" t="+pi.getTheT()+" deltaT="+pi.getDeltaT());
}
}
}
Now that you can run the tests locally. Will you add a test?
Will do. A problem could be to create an image with PlaneInfos in the test environment. But I'll have a look.
I wrote a Python script for idr0113 to populate plane info (parse_time.py) This will have to be translated into Java but that will give you an idea of what to do
Tests in https://github.com/ome/openmicroscopy/pull/6285 are green
Add a similar method to the copyPlaneInfo method of Python BlitzGateway. Should fix https://github.com/ome/omero-gateway-java/issues/54 .
Todo:
Still needs integration test.Done