Interface Image

    • Method Detail

      • setName

        void setName​(java.lang.String name)
        Sets the name of the image.
        Parameters:
        name - The name of the image. Mustn't be null.
        Throws:
        java.lang.IllegalArgumentException - If the name is null.
      • setDescription

        void setDescription​(java.lang.String description)
        Sets the description of the image.
        Parameters:
        description - The description of the image.
      • getAcquisitionDate

        java.sql.Timestamp getAcquisitionDate()
        Gets the ImageData acquisition date
        Returns:
        acquisition date.
      • getImages

        default java.util.List<Image> getImages​(Browser browser)
                                         throws AccessException,
                                                ServiceException,
                                                java.util.concurrent.ExecutionException
        Returns this image, updated from OMERO, as a singleton list.
        Specified by:
        getImages in interface ImageLinked
        Parameters:
        browser - The data browser (unused).
        Returns:
        See above
        Throws:
        AccessException - Cannot access data.
        ServiceException - Cannot connect to OMERO.
        java.util.concurrent.ExecutionException - A Facility can't be retrieved or instantiated.
      • getWells

        default java.util.List<Well> getWells​(Browser browser)
                                       throws AccessException,
                                              ServiceException,
                                              java.util.concurrent.ExecutionException
        Retrieves the wells containing this image.
        Specified by:
        getWells in interface HCSLinked
        Parameters:
        browser - The data browser.
        Returns:
        See above
        Throws:
        ServiceException - Cannot connect to OMERO.
        AccessException - Cannot access data.
        java.util.concurrent.ExecutionException - A Facility can't be retrieved or instantiated.
      • getPlates

        default java.util.List<Plate> getPlates​(Browser browser)
                                         throws AccessException,
                                                ServiceException,
                                                java.util.concurrent.ExecutionException
        Retrieves the plates containing this image.
        Specified by:
        getPlates in interface HCSLinked
        Parameters:
        browser - The data browser.
        Returns:
        See above
        Throws:
        ServiceException - Cannot connect to OMERO.
        AccessException - Cannot access data.
        java.util.concurrent.ExecutionException - A Facility can't be retrieved or instantiated.
      • isOrphaned

        default boolean isOrphaned​(Browser browser)
                            throws ServiceException,
                                   ServerException
        Checks if image is orphaned (not in a WellSample nor linked to a dataset).
        Parameters:
        browser - The data browser.
        Returns:
        true if the image is orphaned, false otherwise.
        Throws:
        ServiceException - Cannot connect to OMERO.
        ServerException - Server error.
      • getFilesetImages

        default java.util.List<Image> getFilesetImages​(Browser browser)
                                                throws AccessException,
                                                       ServiceException,
                                                       java.util.concurrent.ExecutionException,
                                                       ServerException
        Returns the list of images sharing the same fileset as the current image.
        Parameters:
        browser - The data browser.
        Returns:
        See above.
        Throws:
        AccessException - Cannot access data.
        ServiceException - Cannot connect to OMERO.
        java.util.concurrent.ExecutionException - A Facility can't be retrieved or instantiated.
        ServerException - Server error.
      • saveROIs

        java.util.List<ROI> saveROIs​(DataManager dm,
                                     java.util.Collection<? extends ROI> rois)
                              throws ServiceException,
                                     AccessException,
                                     java.util.concurrent.ExecutionException
        Links ROIs to the image in OMERO.

        DO NOT USE IT IF A SHAPE WAS DELETED !!!

        Parameters:
        dm - The data manager.
        rois - ROIs to be added.
        Returns:
        The updated list of ROIs.
        Throws:
        ServiceException - Cannot connect to OMERO.
        AccessException - Cannot access data.
        java.util.concurrent.ExecutionException - A Facility can't be retrieved or instantiated.
      • saveROIs

        default java.util.List<ROI> saveROIs​(DataManager dm,
                                             ROI... rois)
                                      throws ServiceException,
                                             AccessException,
                                             java.util.concurrent.ExecutionException
        Links ROIs to the image in OMERO.

        DO NOT USE IT IF A SHAPE WAS DELETED !!!

        Parameters:
        dm - The data manager.
        rois - ROIs to be added.
        Returns:
        The updated list of ROIs.
        Throws:
        ServiceException - Cannot connect to OMERO.
        AccessException - Cannot access data.
        java.util.concurrent.ExecutionException - A Facility can't be retrieved or instantiated.
      • getROIs

        java.util.List<ROI> getROIs​(DataManager dm)
                             throws ServiceException,
                                    AccessException,
                                    java.util.concurrent.ExecutionException
        Gets all ROIs linked to the image in OMERO
        Parameters:
        dm - The data manager.
        Returns:
        List of ROIs linked to the image.
        Throws:
        ServiceException - Cannot connect to OMERO.
        AccessException - Cannot access data.
        java.util.concurrent.ExecutionException - A Facility can't be retrieved or instantiated.
      • getROIFolders

        java.util.List<Folder> getROIFolders​(DataManager dm)
                                      throws ServiceException,
                                             AccessException,
                                             java.util.concurrent.ExecutionException
        Gets the list of folders linked to the ROIs in this image.
        Parameters:
        dm - The data manager.
        Returns:
        See above.
        Throws:
        ServiceException - Cannot connect to OMERO.
        AccessException - Cannot access data.
        java.util.concurrent.ExecutionException - A Facility can't be retrieved or instantiated.
      • getPixels

        Pixels getPixels()
        Gets the Pixels for this image.
        Returns:
        See above.
      • toImagePlus

        default ImagePlus toImagePlus​(Client client)
                               throws ServiceException,
                                      AccessException,
                                      java.util.concurrent.ExecutionException
        Generates the ImagePlus from the ij library corresponding to the image from OMERO WARNING : you need to include the ij library to use this function
        Parameters:
        client - The client handling the connection.
        Returns:
        ImagePlus generated from the current image.
        Throws:
        ServiceException - Cannot connect to OMERO.
        AccessException - If an error occurs while retrieving the plane data from the pixels source.
        java.util.concurrent.ExecutionException - A Facility can't be retrieved or instantiated.
      • toImagePlus

        ImagePlus toImagePlus​(Client client,
                              int[] xBounds,
                              int[] yBounds,
                              int[] cBounds,
                              int[] zBounds,
                              int[] tBounds)
                       throws ServiceException,
                              AccessException,
                              java.util.concurrent.ExecutionException
        Gets the imagePlus generated from the image from OMERO corresponding to the bound.
        Parameters:
        client - The client handling the connection.
        xBounds - Array containing the X bounds from which the pixels should be retrieved.
        yBounds - Array containing the Y bounds from which the pixels should be retrieved.
        cBounds - Array containing the C bounds from which the pixels should be retrieved.
        zBounds - Array containing the Z bounds from which the pixels should be retrieved.
        tBounds - Array containing the T bounds from which the pixels should be retrieved.
        Returns:
        an ImagePlus from the ij library.
        Throws:
        ServiceException - Cannot connect to OMERO.
        AccessException - If an error occurs while retrieving the plane data from the pixels source.
        java.util.concurrent.ExecutionException - A Facility can't be retrieved or instantiated.
      • toImagePlus

        default ImagePlus toImagePlus​(Client client,
                                      ROI roi)
                               throws ServiceException,
                                      AccessException,
                                      java.util.concurrent.ExecutionException
        Gets the imagePlus from the image generated from the ROI.
        Parameters:
        client - The client handling the connection.
        roi - The ROI.
        Returns:
        an ImagePlus from the ij library.
        Throws:
        ServiceException - Cannot connect to OMERO.
        AccessException - If an error occurs while retrieving the plane data from the pixels source.
        java.util.concurrent.ExecutionException - A Facility can't be retrieved or instantiated.
      • getChannels

        java.util.List<Channel> getChannels​(Browser browser)
                                     throws ServiceException,
                                            AccessException,
                                            java.util.concurrent.ExecutionException
        Gets the image channels.
        Parameters:
        browser - The data browser.
        Returns:
        the channels.
        Throws:
        ServiceException - Cannot connect to OMERO.
        AccessException - Cannot access data.
        java.util.concurrent.ExecutionException - A Facility can't be retrieved or instantiated.
      • getChannelName

        default java.lang.String getChannelName​(Browser browser,
                                                int index)
                                         throws ServiceException,
                                                AccessException,
                                                java.util.concurrent.ExecutionException
        Gets the name of the channel.
        Parameters:
        browser - The data browser.
        index - Channel number.
        Returns:
        name of the channel.
        Throws:
        ServiceException - Cannot connect to OMERO.
        AccessException - Cannot access data.
        java.util.concurrent.ExecutionException - A Facility can't be retrieved or instantiated.
      • getChannelImportedColor

        default java.awt.Color getChannelImportedColor​(Browser browser,
                                                       int index)
                                                throws ServiceException,
                                                       AccessException,
                                                       java.util.concurrent.ExecutionException
        Gets the original color of the channel
        Parameters:
        browser - The data browser.
        index - Channel number.
        Returns:
        Original color of the channel.
        Throws:
        ServiceException - Cannot connect to OMERO.
        AccessException - Cannot access data.
        java.util.concurrent.ExecutionException - A Facility can't be retrieved or instantiated.
      • getChannelColor

        default java.awt.Color getChannelColor​(Client client,
                                               int index)
                                        throws ServiceException,
                                               AccessException,
                                               java.util.concurrent.ExecutionException
        Gets the current color of the channel
        Parameters:
        client - The client handling the connection.
        index - Channel number.
        Returns:
        Color of the channel.
        Throws:
        ServiceException - Cannot connect to OMERO.
        AccessException - Cannot access data.
        java.util.concurrent.ExecutionException - A Facility can't be retrieved or instantiated.
      • getThumbnail

        java.awt.image.BufferedImage getThumbnail​(ConnectionHandler client,
                                                  int size)
                                           throws ServiceException,
                                                  ServerException,
                                                  java.io.IOException
        Retrieves the image thumbnail of the specified size.

        If the image is not square, the size will be the longest side.

        Parameters:
        client - The client handling the connection.
        size - The thumbnail size.
        Returns:
        The thumbnail as a BufferedImage.
        Throws:
        ServiceException - Cannot connect to OMERO.
        ServerException - Server error.
        java.io.IOException - Cannot read thumbnail from store.
      • download

        java.util.List<java.io.File> download​(ConnectionHandler client,
                                              java.lang.String path)
                                       throws ServerException,
                                              ServiceException,
                                              AccessException,
                                              java.util.concurrent.ExecutionException
        Downloads the original files from the server.
        Parameters:
        client - The client handling the connection.
        path - Path to the file.
        Returns:
        See above.
        Throws:
        ServerException - Server error.
        ServiceException - Cannot connect to OMERO.
        AccessException - Cannot access data.
        java.util.concurrent.ExecutionException - A Facility can't be retrieved or instantiated.