Class OmeroRawTools
java.lang.Object
qupath.ext.biop.servers.omero.raw.utils.OmeroRawTools
Static helper methods related to OMERORawImageServer.
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanaddAttachmentToOmero(File file, OmeroRawClient client, long imageId) Deprecated.static booleanaddAttachmentToOmero(File file, OmeroRawClient client, long imageId, String miemtype) Deprecated.useAnnotatableWrapper.link(Client, GenericAnnotationWrapper[])insteadstatic booleanaddAttachmentToOmero(File file, OmeroRawClient client, long imageId, String miemtype, String description) Deprecated.useAnnotatableWrapper.link(Client, GenericAnnotationWrapper[])insteadstatic omero.gateway.model.FileAnnotationDataaddAttachmentToOmero(File file, OmeroRawClient client, omero.gateway.model.DataObject obj) Deprecated.useAnnotatableWrapper.link(Client, GenericAnnotationWrapper[])insteadstatic omero.gateway.model.FileAnnotationDataaddAttachmentToOmero(File file, OmeroRawClient client, omero.gateway.model.DataObject obj, String miemtype) Deprecated.useAnnotatableWrapper.link(Client, GenericAnnotationWrapper[])insteadstatic omero.gateway.model.FileAnnotationDataaddAttachmentToOmero(File file, OmeroRawClient client, omero.gateway.model.DataObject obj, String miemtype, String description) Deprecated.useAnnotatableWrapper.link(Client, GenericAnnotationWrapper[])insteadstatic booleanaddKeyValuesOnOmero(omero.gateway.model.MapAnnotationData keyValuePairs, OmeroRawClient client, long imageId) Deprecated.useAnnotatableWrapper.link(Client, GenericAnnotationWrapper)insteadstatic booleanaddTableToOmero(omero.gateway.model.TableData table, String name, OmeroRawClient client, long imageId) Deprecated.useAnnotatableWrapper.addTable(Client, TableWrapper)insteadstatic omero.gateway.model.TableDataaddTableToOmero(omero.gateway.model.TableData table, String name, OmeroRawClient client, omero.gateway.model.DataObject container) Deprecated.useAnnotatableWrapper.addTable(Client, TableWrapper)insteadstatic booleanaddTagsOnOmero(omero.gateway.model.TagAnnotationData tags, OmeroRawClient client, long imageId) Deprecated.useAnnotatableWrapper.link(Client, GenericAnnotationWrapper)insteadstatic FilebuildCSVFileFromMeasurementTable(Collection<qupath.lib.objects.PathObject> pathObjects, qupath.lib.gui.measure.ObservableMeasurementTableData ob, long imageId, String name, String path) Deprecated.Method moved to a non-public classstatic booleancheckUniqueKeyInAnnotationMap(List<omero.model.NamedValue> keyValues) Deprecated.method moved with a non-public accessstatic omero.gateway.model.TableDataconvertMeasurementTableToOmeroTable(Collection<qupath.lib.objects.PathObject> pathObjects, qupath.lib.gui.measure.ObservableMeasurementTableData ob, OmeroRawClient client, long imageId) Deprecated.Method moved with a non-public accessstatic omero.gateway.model.DatasetDatacreateNewDataset(OmeroRawClient client, long projectId, String datasetName) Deprecated.useProjectWrapper.addDataset(Client, String, String)insteadstatic omero.gateway.model.DatasetDatacreateNewDataset(OmeroRawClient client, long projectId, String datasetName, String datasetDescription) Deprecated.useProjectWrapper.addDataset(Client, String, String)insteadstatic omero.gateway.model.DatasetDatacreateNewDataset(OmeroRawClient client, String datasetName) Deprecated.useDatasetWrapper(String, String)instead followed byGenericObjectWrapper.saveAndUpdate(Client)static omero.gateway.model.DatasetDatacreateNewDataset(OmeroRawClient client, String datasetName, String datasetDescription) Deprecated.useDatasetWrapper(String, String)instead followed byGenericObjectWrapper.saveAndUpdate(Client)static List<fr.igred.omero.roi.ROIWrapper>createOmeroROIsFromPathObjects(Collection<qupath.lib.objects.PathObject> pathObjects) Deprecated.Method moved with a non-public accessstatic Collection<qupath.lib.objects.PathObject>createPathObjectsFromOmeroROIs(List<fr.igred.omero.roi.ROIWrapper> roiWrapperList) Deprecated.Method moved with a non-public accessstatic voiddeleteAllOmeroROIs(OmeroRawClient client, long imageId) Deprecated.useClient.delete(Collection)insteadstatic booleandeleteFiles(OmeroRawClient client, List<omero.gateway.model.FileAnnotationData> data) Deprecated.useClient.delete(Collection)insteadstatic booleandeleteKeyValuesOnOmero(List<omero.gateway.model.MapAnnotationData> keyValuePairs, OmeroRawClient client) Deprecated.useClient.delete(Collection)insteadstatic voiddeleteOmeroROIs(OmeroRawClient client, Collection<omero.gateway.model.ROIData> roisToDelete) Deprecated.useClient.delete(Collection)} insteadstatic booleandownloadImage(OmeroRawClient client, long imageId, String path) Deprecated.useImageWrapper.download(Client, String)insteadstatic List<omero.model.ExperimenterGroup>getAllOmeroGroups(OmeroRawClient client) Deprecated.useClient.getGroups()if the user is admin.static StringDeprecated.useUtils.getCurrentDateAndHour()insteadstatic omero.model.ExperimenterGroupgetDefaultOmeroGroup(OmeroRawClient client, long userId) Deprecated.useExperimenterWrapper.getDefaultGroup()instead andClient.getUser(long)to get theExperimenterWrapperobject.static StringDeprecated.useUtils.getErrorStackTraceAsString(Exception)insteadstatic longgetGroupIdFromImageId(OmeroRawClient client, long imageId) get the group of which an image is part of.static omero.model.ExperimenterGroupgetOmeroGroup(OmeroRawClient client, long groupId, String username) Deprecated.useClient.getGroup(long)orClient.getGroup(String)insteadstatic fr.igred.omero.meta.ExperimenterWrappergetOmeroUser(OmeroRawClient client, long userId, String username) Deprecated.useClient.getUser(long)orClient.getUser(String)insteadstatic List<omero.model.Experimenter>getOmeroUsersInGroup(OmeroRawClient client, long groupId) Deprecated.useGroupWrapper.getExperimenters()instead andClient.getGroup(long)to get theGroupWrapperobjectstatic Collection<? extends omero.gateway.model.DataObject>getParent(OmeroRawClient client, String dataType, long id) Deprecated.static List<? extends fr.igred.omero.repository.GenericRepositoryObjectWrapper<?>>getParentContainer(OmeroRawClient client, fr.igred.omero.repository.GenericRepositoryObjectWrapper<?> container, boolean qpNotif) fetch parents container of OMERO containersgetParentHierarchy(OmeroRawImageServer imageServer, fr.igred.omero.repository.GenericRepositoryObjectWrapper<?> obj, boolean qpNotif) get the parents of an OMERO object (from dataset/well to screen/project)getROIComment(omero.gateway.model.ROIData roiData) Deprecated.Method moved with a non-public accessstatic StringgetROIComment(omero.model.Shape shape) Deprecated.Method moved with a non-public accessstatic URIgetServerURI(URI uri) Return a clean URI of the server from which the given URI is specified.static BufferedImagegetThumbnail(OmeroRawClient client, long imageId, int prefSize) Deprecated.useImageWrapper.getThumbnail(Client, int)insteadstatic List<omero.model.ExperimenterGroup>getUserOmeroGroups(OmeroRawClient client, long userId) Deprecated.useExperimenterWrapper.getGroups()instead andClient.getUser(long)to getExperimenterWrapperobject.static String[]parseROIComment(String comment) Deprecated.Method moved with a non-public accessstatic List<omero.gateway.model.FileAnnotationData>readAttachments(OmeroRawClient client, long imageId) Deprecated.useAnnotatableWrapper.getFileAnnotations(Client)insteadstatic List<omero.gateway.model.FileAnnotationData>readAttachments(OmeroRawClient client, omero.gateway.model.DataObject parent) Deprecated.useAnnotatableWrapper.getFileAnnotations(Client)insteadstatic StringreadImageFileType(OmeroRawClient client, long imageId) Deprecated.useImageWrapper.getFormat()insteadstatic List<omero.gateway.model.MapAnnotationData>readKeyValues(OmeroRawClient client, long imageId) Deprecated.useAnnotatableWrapper.getMapAnnotations(Client)insteadstatic List<omero.model.NamedValue>readKeyValuesAsNamedValue(OmeroRawClient client, long imageId) Deprecated.useMapAnnotationWrapper.getContent()insteadstatic BufferedImagereadLocalImage(String imageName) read an image stored in the resource folder of the main classstatic List<omero.gateway.model.AnnotationData>readOmeroAnnotations(OmeroRawClient client, omero.gateway.model.DataObject obj) Deprecated.useAnnotatableWrapper.getAnnotations(Client)insteadstatic List<omero.gateway.model.ChannelData>readOmeroChannels(OmeroRawClient client, long imageId) Deprecated.useImageWrapper.getChannels(Client)insteadstatic omero.gateway.model.DatasetDatareadOmeroDataset(OmeroRawClient client, Long datasetId) Deprecated.useBrowser.getDataset(Long)insteadstatic Collection<omero.gateway.model.DatasetData>readOmeroDatasets(OmeroRawClient client, List<Long> datasetIds) Deprecated.useBrowser.getDatasets(Long...)static omero.gateway.model.ImageDatareadOmeroImage(OmeroRawClient client, long imageId) Deprecated.useBrowser.getImage(Long)insteadstatic Collection<omero.gateway.model.DatasetData>Deprecated.userBrowser.getOrphanedDatasets(ExperimenterWrapper)} insteadstatic Collection<omero.gateway.model.PlateData>readOmeroPlates(OmeroRawClient client, List<Long> plateIds) Deprecated.usereadPlates(OmeroRawClient, List)insteadstatic Collection<omero.gateway.model.ProjectData>readOmeroProjects(OmeroRawClient client, List<Long> projectIds) Deprecated.useBrowser.getProjects(Long...)insteadstatic Collection<omero.gateway.model.ProjectData>readOmeroProjectsByUser(OmeroRawClient client, long userId) Deprecated.UseBrowser.getProjects(ExperimenterWrapper)insteadstatic omero.model.RenderingDefreadOmeroRenderingSettings(OmeroRawClient client, long pixelsId) read the rendering settings object linked to the specified pixels Code partially copiedImageWrapper.getChannelColor(Client, int)static Collection<omero.gateway.model.ScreenData>readOmeroScreensByUser(OmeroRawClient client, long userId) Deprecated.UseBrowser.getScreens(ExperimenterWrapper)insteadstatic Collection<omero.gateway.model.WellData>readOmeroWells(OmeroRawClient client, long plateId) Deprecated.usePlateWrapper.getWells(Client)static Collection<omero.gateway.model.DatasetData>readOrphanedDatasets(OmeroRawClient client, long userId) Deprecated.userBrowser.getOrphanedDatasets(ExperimenterWrapper)insteadstatic Collection<omero.gateway.model.ImageData>readOrphanedImages(OmeroRawClient client, long userId) Deprecated.useBrowser.getOrphanedImages(ExperimenterWrapper)insteadstatic List<fr.igred.omero.repository.PlateWrapper>readPlates(OmeroRawClient client, List<Long> plateIds) fetch all OMERO plates corresponding to the list of ids.static Collection<omero.gateway.model.FileAnnotationData>readTables(OmeroRawClient client, long imageId) Deprecated.useAnnotatableWrapper.getTables(Client)insteadstatic List<omero.gateway.model.TagAnnotationData>readTags(OmeroRawClient client, long imageId) Deprecated.useAnnotatableWrapper.getTags(Client)insteadstatic List<omero.gateway.model.TagAnnotationData>readUserTags(OmeroRawClient client) Deprecated.useBrowser.getTags()insteadDeprecated.useUtils.splitNewAndExistingKeyValues(Map, Map)insteadstatic booleanupdateKeyValuesOnOmero(List<omero.gateway.model.MapAnnotationData> keyValuePairs, OmeroRawClient client) Deprecated.method removedstatic booleanupdateObjectOnOmero(OmeroRawClient client, omero.model.IObject object) Deprecated.static booleanupdateObjectsOnOmero(OmeroRawClient client, List<omero.model.IObject> objects) Deprecated.Method removed ; use the official APIstatic booleanupdateOmeroThumbnail(OmeroRawClient client, long imageId, long objectId) Update the thumbnail of an OMERO image.uploadImage(OmeroRawClient client, long datasetId, String path) Deprecated.useDatasetWrapper.importImage(Client, String)insteaduploadImage(OmeroRawClient client, fr.igred.omero.repository.DatasetWrapper dataset, String path) Deprecated.useDatasetWrapper.importImage(Client, String)insteadstatic booleanwriteOmeroROIs(OmeroRawClient client, long imageId, List<omero.gateway.model.ROIData> omeroRois) Deprecated.useImageWrapper.saveROIs(Client, ROIWrapper...)instead
-
Method Details
-
getGroupIdFromImageId
get the group of which an image is part of. This method is particularly helpful for admins to deal with images that are not in the default group.- Parameters:
client- the client that handles the OMERO connectionimageId- the id of the image to retrieve- Returns:
- The group id, -1 if the image cannot be fetched.
-
getParentContainer
public static List<? extends fr.igred.omero.repository.GenericRepositoryObjectWrapper<?>> getParentContainer(OmeroRawClient client, fr.igred.omero.repository.GenericRepositoryObjectWrapper<?> container, boolean qpNotif) throws fr.igred.omero.exception.ServiceException, fr.igred.omero.exception.OMEROServerError, fr.igred.omero.exception.AccessException, ExecutionException fetch parents container of OMERO containers- Parameters:
client- the client that handles the OMERO connectioncontainer- child image or containerqpNotif- true to display a QuPath notification- Returns:
- List of Image's, Dataset's, Well's or Plate's parent(s) ; empty list otherwise
- Throws:
fr.igred.omero.exception.ServiceException- Cannot connect to OMERO.fr.igred.omero.exception.AccessException- Data cannot be accessedfr.igred.omero.exception.OMEROServerError- An error occurred server sideExecutionException- The result of a task cannot be retrieved
-
getParentHierarchy
protected static Map<String,String> getParentHierarchy(OmeroRawImageServer imageServer, fr.igred.omero.repository.GenericRepositoryObjectWrapper<?> obj, boolean qpNotif) throws fr.igred.omero.exception.AccessException, fr.igred.omero.exception.ServiceException, fr.igred.omero.exception.OMEROServerError, ExecutionException get the parents of an OMERO object (from dataset/well to screen/project)- Parameters:
imageServer- current QuPath entryobj- OMERO object to read the hierarchy fromqpNotif- true to display a QuPath notification- Returns:
- a map of the parent containers name and id
- Throws:
fr.igred.omero.exception.AccessExceptionfr.igred.omero.exception.ServiceExceptionfr.igred.omero.exception.OMEROServerErrorExecutionException
-
readOmeroRenderingSettings
public static omero.model.RenderingDef readOmeroRenderingSettings(OmeroRawClient client, long pixelsId) throws omero.gateway.exception.DSOutOfServiceException, omero.ServerError read the rendering settings object linked to the specified pixels Code partially copiedImageWrapper.getChannelColor(Client, int)- Parameters:
client- the client that handles the OMERO connectionpixelsId- the id of the image pixels- Returns:
- Image's rendering settings object
- Throws:
omero.gateway.exception.DSOutOfServiceException- Cannot connect to OMEROomero.ServerError- An error occurred server side
-
readPlates
public static List<fr.igred.omero.repository.PlateWrapper> readPlates(OmeroRawClient client, List<Long> plateIds) throws fr.igred.omero.exception.ServiceException, omero.ServerError fetch all OMERO plates corresponding to the list of ids.
This method is necessary to retrieve the entire Plate object for the OMERO browser and cannot be replaced by client.getPlates().
- Parameters:
client- the client that handles the OMERO connectionplateIds- the list of ids to fetch- Returns:
- List of OMERO plates objects
- Throws:
fr.igred.omero.exception.ServiceException- Cannot connect to OMERO.omero.ServerError- An error occurred server side
-
updateOmeroThumbnail
Update the thumbnail of an OMERO image.
Be careful : the image should already have an OMERO ID.- Parameters:
client- the client that handles the OMERO connectionimageId- the id of teh imageobjectId- renderingSettings ID- Returns:
- Updating status (True if updated ; false with error message otherwise)
-
readLocalImage
read an image stored in the resource folder of the main class- Parameters:
imageName- name of the image to read- Returns:
- The read image or null if cannot be read
-
getServerURI
Return a clean URI of the server from which the given URI is specified. This method relies on the specifiedurito be formed properly (with at least a scheme and a host).A few notes:
- If the URI does not contain a host (but does a path), it will be returned without modification.
- If no host and no path is found,
nullis returned. - If the specified
uridoes not contain a scheme,https://will be used.
E.g.
https://www.my-server.com/show=image-462returnshttps://www.my-server.com/- Parameters:
uri-- Returns:
- clean uri
-
readOmeroAnnotations
@Deprecated public static List<omero.gateway.model.AnnotationData> readOmeroAnnotations(OmeroRawClient client, omero.gateway.model.DataObject obj) Deprecated.useAnnotatableWrapper.getAnnotations(Client)insteadGet annotations (i.e. tag, key-value, comment...) attached to an image on OMERO, specified by its id.- Parameters:
client-obj-- Returns:
- List of annotation objects
-
readOmeroWells
@Deprecated public static Collection<omero.gateway.model.WellData> readOmeroWells(OmeroRawClient client, long plateId) Deprecated.usePlateWrapper.getWells(Client)Get all OMERO wells corresponding to the plate id- Parameters:
client-plateId-- Returns:
- List of OMERO dataset objects
-
readOrphanedImages
@Deprecated public static Collection<omero.gateway.model.ImageData> readOrphanedImages(OmeroRawClient client, long userId) Deprecated.useBrowser.getOrphanedImages(ExperimenterWrapper)insteadGet user's orphaned images from the OMERO server- Parameters:
client-userId-- Returns:
- List of orphaned images
-
readOmeroOrphanedDatasets
@Deprecated public static Collection<omero.gateway.model.DatasetData> readOmeroOrphanedDatasets(OmeroRawClient client) Deprecated.userBrowser.getOrphanedDatasets(ExperimenterWrapper)} insteadGet all orphaned datasets from the OMERO server linked to the current group (contained in the security context of the current client).- Parameters:
client-- Returns:
- List of orphaned datasets
-
readOrphanedDatasets
@Deprecated public static Collection<omero.gateway.model.DatasetData> readOrphanedDatasets(OmeroRawClient client, long userId) Deprecated.userBrowser.getOrphanedDatasets(ExperimenterWrapper)insteadGet user's orphaned datasets from the OMERO server- Parameters:
client- the clientOmeroRawClientobjectuserId-- Returns:
- List orphaned of datasets
-
readOmeroProjects
@Deprecated public static Collection<omero.gateway.model.ProjectData> readOmeroProjects(OmeroRawClient client, List<Long> projectIds) Deprecated.useBrowser.getProjects(Long...)insteadGet all OMERO projects corresponding to the list of ids- Parameters:
client-projectIds-- Returns:
- List of OMERO project objects
-
readOmeroProjectsByUser
@Deprecated public static Collection<omero.gateway.model.ProjectData> readOmeroProjectsByUser(OmeroRawClient client, long userId) Deprecated.UseBrowser.getProjects(ExperimenterWrapper)insteadGet all OMERO projects linked to the specified user.- Parameters:
client-userId-- Returns:
- User's list of OMERO project objects
-
readOmeroScreensByUser
@Deprecated public static Collection<omero.gateway.model.ScreenData> readOmeroScreensByUser(OmeroRawClient client, long userId) Deprecated.UseBrowser.getScreens(ExperimenterWrapper)insteadGet all OMERO screens linked to the specified user.- Parameters:
client-userId-- Returns:
- User's list of OMERO project objects
-
readOmeroDatasets
@Deprecated public static Collection<omero.gateway.model.DatasetData> readOmeroDatasets(OmeroRawClient client, List<Long> datasetIds) Deprecated.useBrowser.getDatasets(Long...)Get all OMERO datasets corresponding to the list of ids- Parameters:
client-datasetIds-- Returns:
- List of OMERO dataset objects
-
readOmeroPlates
@Deprecated public static Collection<omero.gateway.model.PlateData> readOmeroPlates(OmeroRawClient client, List<Long> plateIds) Deprecated.usereadPlates(OmeroRawClient, List)insteadGet all OMERO datasets corresponding to the list of ids- Parameters:
client-plateIds-- Returns:
- List of OMERO dataset objects
-
deleteAllOmeroROIs
Deprecated.useClient.delete(Collection)insteadDelete all existing ROIs on OMERO that are linked to an image, specified by its id.- Parameters:
client-imageId-
-
deleteOmeroROIs
@Deprecated public static void deleteOmeroROIs(OmeroRawClient client, Collection<omero.gateway.model.ROIData> roisToDelete) Deprecated.useClient.delete(Collection)} insteadDelete the specified ROIs on OMERO that are linked to an image, specified by its id.- Parameters:
client-roisToDelete-
-
writeOmeroROIs
@Deprecated public static boolean writeOmeroROIs(OmeroRawClient client, long imageId, List<omero.gateway.model.ROIData> omeroRois) Deprecated.useImageWrapper.saveROIs(Client, ROIWrapper...)insteadSend ROIs to OMERO server and attached them to the specified image.- Parameters:
client-imageId-omeroRois-- Returns:
- Sending status (True if sent ; false with error message otherwise)
-
createOmeroROIsFromPathObjects
@Deprecated public static List<fr.igred.omero.roi.ROIWrapper> createOmeroROIsFromPathObjects(Collection<qupath.lib.objects.PathObject> pathObjects) Deprecated.Method moved with a non-public accessConvert QuPath pathObjects into OMERO ROIs.- Parameters:
pathObjects-- Returns:
- List of OMERO ROIs
-
createPathObjectsFromOmeroROIs
@Deprecated public static Collection<qupath.lib.objects.PathObject> createPathObjectsFromOmeroROIs(List<fr.igred.omero.roi.ROIWrapper> roiWrapperList) Deprecated.Method moved with a non-public accessConvert OMERO ROIs into QuPath pathObjects- Parameters:
roiWrapperList-- Returns:
- List of QuPath pathObjects
-
getROIComment
Deprecated.Method moved with a non-public accessRead the comment attached to one shape of an OMERO ROI.- Parameters:
shape-- Returns:
- The shape comment
-
getROIComment
Deprecated.Method moved with a non-public accessRead the comments attach to an OMERO ROI (i.e. read each comment attached to each shape of the ROI)- Parameters:
roiData-- Returns:
- List of comments
-
parseROIComment
Deprecated.Method moved with a non-public accessParse the comment based on the format introduced in {OmeroRawShapes.setRoiComment(PathObject src, String objectID, String parentID)}- Parameters:
comment-- Returns:
- The split comment
-
updateKeyValuesOnOmero
@Deprecated public static boolean updateKeyValuesOnOmero(List<omero.gateway.model.MapAnnotationData> keyValuePairs, OmeroRawClient client) Deprecated.method removedUpdate specified key value pairs on OMERO server.- Parameters:
keyValuePairs-client-- Returns:
- Updating status (True if updated ; false with error message otherwise)
-
deleteKeyValuesOnOmero
@Deprecated public static boolean deleteKeyValuesOnOmero(List<omero.gateway.model.MapAnnotationData> keyValuePairs, OmeroRawClient client) Deprecated.useClient.delete(Collection)insteadDelete specified key value pairs on OMERO server- Parameters:
keyValuePairs-client-- Returns:
- Deleting status (True if deleted ; false with error message otherwise)
-
checkUniqueKeyInAnnotationMap
@Deprecated public static boolean checkUniqueKeyInAnnotationMap(List<omero.model.NamedValue> keyValues) Deprecated.method moved with a non-public accessTry to solve an error in OMERO regarding the keys creation. On OMERO, it is possible to have two identical keys with a different value. This should normally never append. This method checks if all keys are unique and output false if there is at least two identical keys.- Parameters:
keyValues-- Returns:
- Check status (True if all keys unique ; false otherwise)
-
addKeyValuesOnOmero
@Deprecated public static boolean addKeyValuesOnOmero(omero.gateway.model.MapAnnotationData keyValuePairs, OmeroRawClient client, long imageId) Deprecated.useAnnotatableWrapper.link(Client, GenericAnnotationWrapper)insteadSend key value pairs on OMERO and attach them to the specified image.- Parameters:
keyValuePairs-client-imageId-- Returns:
- Sending status (True if sent ; false with error message otherwise)
-
readKeyValuesAsNamedValue
@Deprecated public static List<omero.model.NamedValue> readKeyValuesAsNamedValue(OmeroRawClient client, long imageId) Deprecated.useMapAnnotationWrapper.getContent()insteadRead key value pairs from OMERO server and convert them into NamedValue OMERO-compatible-objects.- Parameters:
client-imageId-- Returns:
- List of NamedValue objects.
-
readKeyValues
@Deprecated public static List<omero.gateway.model.MapAnnotationData> readKeyValues(OmeroRawClient client, long imageId) Deprecated.useAnnotatableWrapper.getMapAnnotations(Client)insteadGet key-value pairs from OMERO server attached to the specified image.- Parameters:
client-imageId-- Returns:
- List of Key-Value pairs as annotation objects
-
readTags
@Deprecated public static List<omero.gateway.model.TagAnnotationData> readTags(OmeroRawClient client, long imageId) Deprecated.useAnnotatableWrapper.getTags(Client)insteadRead tags from OMERO server, attached to the specified image.- Parameters:
client-imageId-- Returns:
- List of Tag objects attached to the image
-
readUserTags
@Deprecated public static List<omero.gateway.model.TagAnnotationData> readUserTags(OmeroRawClient client) Deprecated.useBrowser.getTags()insteadRead all tags available for the logged-in user- Parameters:
client-- Returns:
- List of available tag objects
-
addTagsOnOmero
@Deprecated public static boolean addTagsOnOmero(omero.gateway.model.TagAnnotationData tags, OmeroRawClient client, long imageId) Deprecated.useAnnotatableWrapper.link(Client, GenericAnnotationWrapper)insteadSend a new tag on OMERO server and attach it to the specified image.- Parameters:
tags-client-imageId-- Returns:
- Sending status (True if sent ; false with error message otherwise)
-
createNewDataset
@Deprecated public static omero.gateway.model.DatasetData createNewDataset(OmeroRawClient client, long projectId, String datasetName, String datasetDescription) Deprecated.useProjectWrapper.addDataset(Client, String, String)insteadcreate a new dataset on OMERO and add a project as parent object- Parameters:
client-projectId-datasetName-datasetDescription-- Returns:
- OMERO dataset
-
createNewDataset
@Deprecated public static omero.gateway.model.DatasetData createNewDataset(OmeroRawClient client, String datasetName, String datasetDescription) Deprecated.useDatasetWrapper(String, String)instead followed byGenericObjectWrapper.saveAndUpdate(Client)create a new orphaned dataset on OMERO- Parameters:
client-datasetName-datasetDescription-- Returns:
- OMERO dataset
-
createNewDataset
@Deprecated public static omero.gateway.model.DatasetData createNewDataset(OmeroRawClient client, String datasetName) Deprecated.useDatasetWrapper(String, String)instead followed byGenericObjectWrapper.saveAndUpdate(Client)create a new orphaned dataset on OMERO- Parameters:
client-datasetName-- Returns:
- OMERO dataset
-
createNewDataset
@Deprecated public static omero.gateway.model.DatasetData createNewDataset(OmeroRawClient client, long projectId, String datasetName) Deprecated.useProjectWrapper.addDataset(Client, String, String)insteadcreate a new dataset on OMERO and add a project as parent object- Parameters:
client-projectId-datasetName-- Returns:
- OMERO dataset
-
readOmeroDataset
@Deprecated public static omero.gateway.model.DatasetData readOmeroDataset(OmeroRawClient client, Long datasetId) Deprecated.useBrowser.getDataset(Long)insteadGet OMERO corresponding to the id- Parameters:
client-datasetId-- Returns:
- OMERO dataset or null object is ot doesn't exists
-
getCurrentDateAndHour
Deprecated.useUtils.getCurrentDateAndHour()instead- Returns:
- formatted date
-
getErrorStackTraceAsString
Deprecated.useUtils.getErrorStackTraceAsString(Exception)instead- Parameters:
e-- Returns:
- stack trace
-
splitNewAndExistingKeyValues
@Deprecated public static List<Map<String,String>> splitNewAndExistingKeyValues(Map<String, String> reference, Map<String, String> target) Deprecated.useUtils.splitNewAndExistingKeyValues(Map, Map)insteadSplits the "target" map into two parts : one part containing key/values that are referenced in the "reference" map and the other containing remaining key/values that are not referenced in the "reference".- Parameters:
reference-target-- Returns:
- List of new kvp and existing kvp maps
-
readOmeroChannels
@Deprecated public static List<omero.gateway.model.ChannelData> readOmeroChannels(OmeroRawClient client, long imageId) Deprecated.useImageWrapper.getChannels(Client)insteadGet OMERO image's channels- Parameters:
client-imageId-- Returns:
- List of channels objects of the specified image
-
readImageFileType
Deprecated.useImageWrapper.getFormat()insteadGet the image file format (ex. .lif, .vsi,...)- Parameters:
client-imageId-- Returns:
- Image file format
-
downloadImage
Deprecated.useImageWrapper.download(Client, String)insteadDownload an image from OMERO in the path given in argument.- Parameters:
client-imageId-path-- Returns:
- Downloading status (True if downloaded ; false with error message otherwise)
-
uploadImage
@Deprecated public static List<Long> uploadImage(OmeroRawClient client, long datasetId, String path) Deprecated.useDatasetWrapper.importImage(Client, String)insteadUpload an image to a specific dataset on OMERO- Parameters:
client-datasetId-path-- Returns:
- id of the newly uploaded image
-
uploadImage
@Deprecated public static List<Long> uploadImage(OmeroRawClient client, fr.igred.omero.repository.DatasetWrapper dataset, String path) throws fr.igred.omero.exception.AccessException, fr.igred.omero.exception.ServiceException, fr.igred.omero.exception.OMEROServerError, ExecutionException Deprecated.useDatasetWrapper.importImage(Client, String)insteadUpload an image to a specific dataset on OMERO Code taken from simple-omero-client project from Pierre Pouchin (GreD-Clermont)- Parameters:
client-dataset-path-- Returns:
- id of the newly uploaded image
- Throws:
fr.igred.omero.exception.AccessExceptionfr.igred.omero.exception.ServiceExceptionfr.igred.omero.exception.OMEROServerErrorExecutionException
-
getThumbnail
@Deprecated public static BufferedImage getThumbnail(OmeroRawClient client, long imageId, int prefSize) Deprecated.useImageWrapper.getThumbnail(Client, int)insteadGet the thumbnail of the specified OMERO image.
Code copied from Pierre Pouchin from {simple-omero-client} project, {ImageWrapper} class, {getThumbnail} method and adapted for QuPath compatibility.- Parameters:
client-imageId-prefSize-- Returns:
- The image's thumbnail
-
updateObjectsOnOmero
@Deprecated public static boolean updateObjectsOnOmero(OmeroRawClient client, List<omero.model.IObject> objects) Deprecated.Method removed ; use the official APIUpdate a list of OMERO objects- Parameters:
client-objects-- Returns:
- Updating status (True if updated ; false with error message otherwise)
-
updateObjectOnOmero
@Deprecated public static boolean updateObjectOnOmero(OmeroRawClient client, omero.model.IObject object) Deprecated.Update an OMERO object.- Parameters:
client-object-- Returns:
- Updating status (True if updated ; false with error message otherwise) * @deprecated Method removed ; use the official API
-
convertMeasurementTableToOmeroTable
@Deprecated public static omero.gateway.model.TableData convertMeasurementTableToOmeroTable(Collection<qupath.lib.objects.PathObject> pathObjects, qupath.lib.gui.measure.ObservableMeasurementTableData ob, OmeroRawClient client, long imageId) Deprecated.Method moved with a non-public accessConvert a QuPath measurement table to an OMERO table- Parameters:
pathObjects-ob-client-imageId-- Returns:
- The corresponding OMERO.Table
-
addTableToOmero
@Deprecated public static boolean addTableToOmero(omero.gateway.model.TableData table, String name, OmeroRawClient client, long imageId) Deprecated.useAnnotatableWrapper.addTable(Client, TableWrapper)insteadSend an OMERO.table to OMERO server and attach it to the image specified by its ID.- Parameters:
table- OMERO.tablename- table nameclient-imageId-- Returns:
- Sending status (True if sent and attached ; false with error message otherwise)
-
addTableToOmero
@Deprecated public static omero.gateway.model.TableData addTableToOmero(omero.gateway.model.TableData table, String name, OmeroRawClient client, omero.gateway.model.DataObject container) Deprecated.useAnnotatableWrapper.addTable(Client, TableWrapper)insteadSend an OMERO.table to OMERO server and attach it to the specified container- Parameters:
table- OMERO.tablename- table nameclient-container-- Returns:
- Sending status (True if sent and attached ; false with error message otherwise)
-
addAttachmentToOmero
@Deprecated public static boolean addAttachmentToOmero(File file, OmeroRawClient client, long imageId) Deprecated.useAnnotatableWrapper.link(Client, GenericAnnotationWrapper[])insteadSend an attachment to OMERO server and attached it to an image specified by its ID.- Parameters:
file-client-imageId-- Returns:
- Sending status (True if sent and attached ; false with error message otherwise)
-
addAttachmentToOmero
@Deprecated public static boolean addAttachmentToOmero(File file, OmeroRawClient client, long imageId, String miemtype) Deprecated.useAnnotatableWrapper.link(Client, GenericAnnotationWrapper[])insteadSend an attachment to OMERO server and attached it to an image specified by its ID. You can specify the mimetype of the file.- Parameters:
file-client-imageId-miemtype-- Returns:
- Sending status (True if sent and attached ; false with error message otherwise)
-
addAttachmentToOmero
@Deprecated public static boolean addAttachmentToOmero(File file, OmeroRawClient client, long imageId, String miemtype, String description) Deprecated.useAnnotatableWrapper.link(Client, GenericAnnotationWrapper[])insteadSend an attachment to OMERO server and attached it to an image specified by its ID, specifying the mimetype and a description of what the file is and how it works.- Parameters:
file-client-imageId-miemtype-description-- Returns:
- Sending status (True if sent and attached ; false with error message otherwise)
-
addAttachmentToOmero
@Deprecated public static omero.gateway.model.FileAnnotationData addAttachmentToOmero(File file, OmeroRawClient client, omero.gateway.model.DataObject obj) Deprecated.useAnnotatableWrapper.link(Client, GenericAnnotationWrapper[])insteadSend an attachment to OMERO server and attached it in the specified container.- Parameters:
file-client-obj-- Returns:
- Sending status (True if sent and attached ; false with error message otherwise)
-
addAttachmentToOmero
@Deprecated public static omero.gateway.model.FileAnnotationData addAttachmentToOmero(File file, OmeroRawClient client, omero.gateway.model.DataObject obj, String miemtype) Deprecated.useAnnotatableWrapper.link(Client, GenericAnnotationWrapper[])insteadSend an attachment to OMERO server and attached it in the specified container. You can specify the mimetype of the file.- Parameters:
file-client-obj-miemtype-- Returns:
- Sending status (True if sent and attached ; false with error message otherwise)
-
addAttachmentToOmero
@Deprecated public static omero.gateway.model.FileAnnotationData addAttachmentToOmero(File file, OmeroRawClient client, omero.gateway.model.DataObject obj, String miemtype, String description) Deprecated.useAnnotatableWrapper.link(Client, GenericAnnotationWrapper[])insteadSend an attachment to OMERO server and attached it in the specified container., specifying the mimetype and a description of what the file is and how it works.- Parameters:
file-client-obj-miemtype-description-- Returns:
- Sending status (True if sent and attached ; false with error message otherwise)
-
buildCSVFileFromMeasurementTable
@Deprecated public static File buildCSVFileFromMeasurementTable(Collection<qupath.lib.objects.PathObject> pathObjects, qupath.lib.gui.measure.ObservableMeasurementTableData ob, long imageId, String name, String path) Deprecated.Method moved to a non-public classConvert a QuPath measurement table into a CSV file, including the OMERO image ID on which the measurements are referring to.- Parameters:
pathObjects-ob-imageId-name- file namepath- where to save the newly created CSV file.- Returns:
- CSV file of measurement table.
-
readAttachments
@Deprecated public static List<omero.gateway.model.FileAnnotationData> readAttachments(OmeroRawClient client, long imageId) Deprecated.useAnnotatableWrapper.getFileAnnotations(Client)insteadGet attachments from OMERO server attached to the specified image.- Parameters:
client-imageId-- Returns:
- Sending status (True if retrieved ; false with error message otherwise)
-
readAttachments
@Deprecated public static List<omero.gateway.model.FileAnnotationData> readAttachments(OmeroRawClient client, omero.gateway.model.DataObject parent) Deprecated.useAnnotatableWrapper.getFileAnnotations(Client)insteadGet attachments from OMERO server attached to the specified image.- Parameters:
client-parent-- Returns:
- Sending status (True if retrieved ; false with error message otherwise)
-
readTables
@Deprecated public static Collection<omero.gateway.model.FileAnnotationData> readTables(OmeroRawClient client, long imageId) Deprecated.useAnnotatableWrapper.getTables(Client)insteadGet tables from OMERO server attached to the specified image.- Parameters:
client-imageId-- Returns:
- Sending status (True if retrieved ; false with error message otherwise)
-
deleteFiles
@Deprecated public static boolean deleteFiles(OmeroRawClient client, List<omero.gateway.model.FileAnnotationData> data) Deprecated.useClient.delete(Collection)insteadDelete given files on OMERO- Parameters:
client-data-
-
readOmeroImage
@Deprecated public static omero.gateway.model.ImageData readOmeroImage(OmeroRawClient client, long imageId) Deprecated.useBrowser.getImage(Long)insteadGet an image from OMERO server, corresponding to the specified id.- Parameters:
client-imageId-- Returns:
- OMERO image object
-
getOmeroUser
@Deprecated public static fr.igred.omero.meta.ExperimenterWrapper getOmeroUser(OmeroRawClient client, long userId, String username) Deprecated.useClient.getUser(long)orClient.getUser(String)insteadRetrieve a user on OMERO based on its ID- Parameters:
client-userId-username-- Returns:
- The specified OMERO user
-
getOmeroUsersInGroup
@Deprecated public static List<omero.model.Experimenter> getOmeroUsersInGroup(OmeroRawClient client, long groupId) Deprecated.useGroupWrapper.getExperimenters()instead andClient.getGroup(long)to get theGroupWrapperobjectRetrieve all users within the group on OMERO- Parameters:
client-groupId-- Returns:
- A list of all OMERO user within the specified group
-
getOmeroGroup
@Deprecated public static omero.model.ExperimenterGroup getOmeroGroup(OmeroRawClient client, long groupId, String username) Deprecated.useClient.getGroup(long)orClient.getGroup(String)insteadRetrieve a group on OMERO based on its id- Parameters:
client-groupId-- Returns:
- The specified OMERO group
-
getUserOmeroGroups
@Deprecated public static List<omero.model.ExperimenterGroup> getUserOmeroGroups(OmeroRawClient client, long userId) Deprecated.useExperimenterWrapper.getGroups()instead andClient.getUser(long)to getExperimenterWrapperobject.get all the groups where the current user is member of- Parameters:
client-userId-- Returns:
- The list of user's OMERO groups
-
getDefaultOmeroGroup
@Deprecated public static omero.model.ExperimenterGroup getDefaultOmeroGroup(OmeroRawClient client, long userId) Deprecated.useExperimenterWrapper.getDefaultGroup()instead andClient.getUser(long)to get theExperimenterWrapperobject.Get the default OMERO group of the specified user- Parameters:
client-userId-- Returns:
- User's OMERO default group
-
getAllOmeroGroups
@Deprecated public static List<omero.model.ExperimenterGroup> getAllOmeroGroups(OmeroRawClient client) Deprecated.useClient.getGroups()if the user is admin. Otherwise, useExperimenterWrapper.getGroups()get all the groups on OMERO server. This functionality is reserved to Admin people. In case you are not Admin,ExperimenterWrapper.getGroups()method is called instead.- Parameters:
client-- Returns:
- The list of all groups on OMERO server
-
getParent
@Deprecated public static Collection<? extends omero.gateway.model.DataObject> getParent(OmeroRawClient client, String dataType, long id) Deprecated.Retrieve parents of OMERO containers (i.e. Image, Dataset, Well and Plate). For Project, Screen and other, it returns an empty list.- Parameters:
client-dataType- image or container denomination (no case sensitive)id- image or container id- Returns:
- List of object's parent(s) or empty list
-
AnnotatableWrapper.link(Client, GenericAnnotationWrapper[])instead