cytomine / Cytomine-java-client

Cytomine Java client
Apache License 2.0
12 stars 14 forks source link

Image Servers for Abstract Image method implementation #7

Closed danyfel80 closed 6 years ago

danyfel80 commented 6 years ago

implemented be.cytomine.client.Cytomine#getImageServersForAbstractImage(Long idAbstractImage) test created on be.cytomine.client.sample.ImageServersExample

urubens commented 6 years ago

Thanks for your contribution. However, the code could be improved. It would be better to follow the same philosophy as in the rest of the Java client: create a model for ImageServers and use fetchModel().

You can inspire yourself from the implementation in the Python client : https://github.com/cytomine/Cytomine-python-client/blob/006614a8cc485129ccf6b98c22a6806590091a3a/client/cytomine/cytomine.py#L447

danyfel80 commented 6 years ago

Changes done, now there is a class called ImageServers derived from Model and fetches the data correctly. Also, there are now two methods on Cytomine class:

be.cytomine.client.Cytomine#getAbstractImageServers(AbstractImage) // for abstract images
be.cytomine.client.Cytomine#getImageInstanceServers(ImageInstance) // for image instances

see an example in be.cytomine.client.sample.ImageServersExample

urubens commented 6 years ago

Perfect, thanks for your adding !