Class OmeroRawTools

java.lang.Object
qupath.ext.biop.servers.omero.raw.utils.OmeroRawTools

public class OmeroRawTools extends Object
Static helper methods related to OMERORawImageServer.
  • Method Details

    • getGroupIdFromImageId

      public static long getGroupIdFromImageId(OmeroRawClient client, long imageId)
      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 connection
      imageId - 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 connection
      container - child image or container
      qpNotif - 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 accessed
      fr.igred.omero.exception.OMEROServerError - An error occurred server side
      ExecutionException - 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 entry
      obj - OMERO object to read the hierarchy from
      qpNotif - true to display a QuPath notification
      Returns:
      a map of the parent containers name and id
      Throws:
      fr.igred.omero.exception.AccessException
      fr.igred.omero.exception.ServiceException
      fr.igred.omero.exception.OMEROServerError
      ExecutionException
    • 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 copied ImageWrapper.getChannelColor(Client, int)
      Parameters:
      client - the client that handles the OMERO connection
      pixelsId - the id of the image pixels
      Returns:
      Image's rendering settings object
      Throws:
      omero.gateway.exception.DSOutOfServiceException - Cannot connect to OMERO
      omero.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 connection
      plateIds - 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

      public static boolean updateOmeroThumbnail(OmeroRawClient client, long imageId, long objectId)
      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 connection
      imageId - the id of teh image
      objectId - renderingSettings ID
      Returns:
      Updating status (True if updated ; false with error message otherwise)
    • readLocalImage

      public static BufferedImage readLocalImage(String imageName)
      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

      public static URI getServerURI(URI uri)
      Return a clean URI of the server from which the given URI is specified. This method relies on the specified uri to 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, null is returned.
      • If the specified uri does not contain a scheme, https:// will be used.

      E.g. https://www.my-server.com/show=image-462 returns https://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.
      use AnnotatableWrapper.getAnnotations(Client) instead
      Get 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.
      use PlateWrapper.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.
      use Browser.getOrphanedImages(ExperimenterWrapper) instead
      Get 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.
      user Browser.getOrphanedDatasets(ExperimenterWrapper)} instead
      Get 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.
      user Browser.getOrphanedDatasets(ExperimenterWrapper) instead
      Get user's orphaned datasets from the OMERO server
      Parameters:
      client - the client OmeroRawClient object
      userId -
      Returns:
      List orphaned of datasets
    • readOmeroProjects

      @Deprecated public static Collection<omero.gateway.model.ProjectData> readOmeroProjects(OmeroRawClient client, List<Long> projectIds)
      Deprecated.
      use Browser.getProjects(Long...) instead
      Get 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.
      Use Browser.getProjects(ExperimenterWrapper) instead
      Get 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.
      Use Browser.getScreens(ExperimenterWrapper) instead
      Get 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.
      use Browser.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.
      Get all OMERO datasets corresponding to the list of ids
      Parameters:
      client -
      plateIds -
      Returns:
      List of OMERO dataset objects
    • deleteAllOmeroROIs

      @Deprecated public static void deleteAllOmeroROIs(OmeroRawClient client, long imageId)
      Deprecated.
      use Client.delete(Collection) instead
      Delete 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.
      use Client.delete(Collection)} instead
      Delete 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.
      use ImageWrapper.saveROIs(Client, ROIWrapper...) instead
      Send 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 access
      Convert 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 access
      Convert OMERO ROIs into QuPath pathObjects
      Parameters:
      roiWrapperList -
      Returns:
      List of QuPath pathObjects
    • getROIComment

      @Deprecated public static String getROIComment(omero.model.Shape shape)
      Deprecated.
      Method moved with a non-public access
      Read the comment attached to one shape of an OMERO ROI.
      Parameters:
      shape -
      Returns:
      The shape comment
    • getROIComment

      @Deprecated public static List<String> getROIComment(omero.gateway.model.ROIData roiData)
      Deprecated.
      Method moved with a non-public access
      Read 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 public static String[] parseROIComment(String comment)
      Deprecated.
      Method moved with a non-public access
      Parse 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 removed
      Update 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.
      use Client.delete(Collection) instead
      Delete 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 access
      Try 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.
      use AnnotatableWrapper.link(Client, GenericAnnotationWrapper) instead
      Send 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.
      use MapAnnotationWrapper.getContent() instead
      Read 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.
      use AnnotatableWrapper.getMapAnnotations(Client) instead
      Get 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.
      use AnnotatableWrapper.getTags(Client) instead
      Read 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.
      use Browser.getTags() instead
      Read 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.
      use AnnotatableWrapper.link(Client, GenericAnnotationWrapper) instead
      Send 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.
      use ProjectWrapper.addDataset(Client, String, String) instead
      create 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.
      use DatasetWrapper(String, String) instead followed by GenericObjectWrapper.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.
      use DatasetWrapper(String, String) instead followed by GenericObjectWrapper.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.
      use ProjectWrapper.addDataset(Client, String, String) instead
      create 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.
      use Browser.getDataset(Long) instead
      Get OMERO corresponding to the id
      Parameters:
      client -
      datasetId -
      Returns:
      OMERO dataset or null object is ot doesn't exists
    • getCurrentDateAndHour

      @Deprecated public static String getCurrentDateAndHour()
      Deprecated.
      Returns:
      formatted date
    • getErrorStackTraceAsString

      @Deprecated public static String getErrorStackTraceAsString(Exception e)
      Parameters:
      e -
      Returns:
      stack trace
    • splitNewAndExistingKeyValues

      @Deprecated public static List<Map<String,String>> splitNewAndExistingKeyValues(Map<String,String> reference, Map<String,String> target)
      Splits 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.
      use ImageWrapper.getChannels(Client) instead
      Get OMERO image's channels
      Parameters:
      client -
      imageId -
      Returns:
      List of channels objects of the specified image
    • readImageFileType

      @Deprecated public static String readImageFileType(OmeroRawClient client, long imageId)
      Deprecated.
      use ImageWrapper.getFormat() instead
      Get the image file format (ex. .lif, .vsi,...)
      Parameters:
      client -
      imageId -
      Returns:
      Image file format
    • downloadImage

      @Deprecated public static boolean downloadImage(OmeroRawClient client, long imageId, String path)
      Deprecated.
      use ImageWrapper.download(Client, String) instead
      Download 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.
      use DatasetWrapper.importImage(Client, String) instead
      Upload 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.
      use DatasetWrapper.importImage(Client, String) instead
      Upload 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.AccessException
      fr.igred.omero.exception.ServiceException
      fr.igred.omero.exception.OMEROServerError
      ExecutionException
    • getThumbnail

      @Deprecated public static BufferedImage getThumbnail(OmeroRawClient client, long imageId, int prefSize)
      Deprecated.
      use ImageWrapper.getThumbnail(Client, int) instead
      Get 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 API
      Update 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 access
      Convert 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.
      use AnnotatableWrapper.addTable(Client, TableWrapper) instead
      Send an OMERO.table to OMERO server and attach it to the image specified by its ID.
      Parameters:
      table - OMERO.table
      name - table name
      client -
      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.
      use AnnotatableWrapper.addTable(Client, TableWrapper) instead
      Send an OMERO.table to OMERO server and attach it to the specified container
      Parameters:
      table - OMERO.table
      name - table name
      client -
      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.
      use AnnotatableWrapper.link(Client, GenericAnnotationWrapper[]) instead
      Send 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.
      use AnnotatableWrapper.link(Client, GenericAnnotationWrapper[]) instead
      Send 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.
      use AnnotatableWrapper.link(Client, GenericAnnotationWrapper[]) instead
      Send 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.
      use AnnotatableWrapper.link(Client, GenericAnnotationWrapper[]) instead
      Send 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.
      use AnnotatableWrapper.link(Client, GenericAnnotationWrapper[]) instead
      Send 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.
      use AnnotatableWrapper.link(Client, GenericAnnotationWrapper[]) instead
      Send 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 class
      Convert 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 name
      path - 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.
      use AnnotatableWrapper.getFileAnnotations(Client) instead
      Get 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.
      use AnnotatableWrapper.getFileAnnotations(Client) instead
      Get 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.
      use AnnotatableWrapper.getTables(Client) instead
      Get 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.
      use Client.delete(Collection) instead
      Delete given files on OMERO
      Parameters:
      client -
      data -
    • readOmeroImage

      @Deprecated public static omero.gateway.model.ImageData readOmeroImage(OmeroRawClient client, long imageId)
      Deprecated.
      use Browser.getImage(Long) instead
      Get 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.
      use Client.getUser(long) or Client.getUser(String) instead
      Retrieve 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.
      use GroupWrapper.getExperimenters() instead and Client.getGroup(long) to get the GroupWrapper object
      Retrieve 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.
      use Client.getGroup(long) or Client.getGroup(String)instead
      Retrieve 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.
      use ExperimenterWrapper.getGroups() instead and Client.getUser(long) to get ExperimenterWrapper object.
      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.
      use ExperimenterWrapper.getDefaultGroup() instead and Client.getUser(long) to get the ExperimenterWrapper object.
      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.
      use Client.getGroups() if the user is admin. Otherwise, use ExperimenterWrapper.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)
      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