Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add method to get PlaneInfos #57

Merged
merged 1 commit into from
Aug 31, 2021
Merged

Add method to get PlaneInfos #57

merged 1 commit into from
Aug 31, 2021

Conversation

dominikl
Copy link
Member

@dominikl dominikl commented Jul 1, 2021

Add a similar method to the copyPlaneInfo method of Python BlitzGateway. Should fix #54 .

Todo: Still needs integration test. Done

@dominikl
Copy link
Member Author

dominikl commented Jul 13, 2021

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());
            }
        }
    }

@jburel
Copy link
Member

jburel commented Jul 14, 2021

Now that you can run the tests locally. Will you add a test?

@dominikl
Copy link
Member Author

Will do. A problem could be to create an image with PlaneInfos in the test environment. But I'll have a look.

@jburel
Copy link
Member

jburel commented Jul 14, 2021

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

try {
ParametersI p = new ParametersI();
p.addLong("id", pix.getId());
List<IObject> planeinfos = gateway.getQueryService(ctx)
Copy link
Member

@jburel jburel Aug 24, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably be declared in IMetadata.ice (blitz) and implemented in omero-server as we have done with other similar method calls.

This could be done in a follow-up PR

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you want to capture that in an issue since I think both Python and JAva will benefit from having such method instead o directly using IQuery

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's true. Issue created.

@jburel
Copy link
Member

jburel commented Aug 26, 2021

Tests in ome/openmicroscopy#6285 are green

@jburel jburel merged commit 291a989 into ome:master Aug 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PlaneInfo
2 participants