Package fr.igred.omero.core
Interface Image
-
- All Superinterfaces:
Annotatable
,ContainerLinked
,HCSLinked
,ImageLinked
,RemoteObject
,RepositoryObject
- All Known Implementing Classes:
ImageWrapper
public interface Image extends RepositoryObject, ContainerLinked, HCSLinked
Interface to handle Images on OMERO.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description ImageData
asDataObject()
Returns aImageData
corresponding to the handled object.java.util.List<java.io.File>
download(ConnectionHandler client, java.lang.String path)
Downloads the original files from the server.java.sql.Timestamp
getAcquisitionDate()
Gets the ImageData acquisition datedefault java.awt.Color
getChannelColor(Client client, int index)
Gets the current color of the channeldefault java.awt.Color
getChannelImportedColor(Browser browser, int index)
Gets the original color of the channeldefault java.lang.String
getChannelName(Browser browser, int index)
Gets the name of the channel.java.util.List<Channel>
getChannels(Browser browser)
Gets the image channels.default java.util.List<Dataset>
getDatasets(Browser browser)
Retrieves the datasets containing this imagedefault java.util.List<Image>
getFilesetImages(Browser browser)
Returns the list of images sharing the same fileset as the current image.default java.util.List<Folder>
getFolders(Browser browser)
Gets the list of folders linked to this image.default java.util.List<Image>
getImages(Browser browser)
Returns this image, updated from OMERO, as a singleton list.Pixels
getPixels()
Gets the Pixels for this image.default java.util.List<PlateAcquisition>
getPlateAcquisitions(Browser browser)
Returns the plate acquisitions linked to this image.default java.util.List<Plate>
getPlates(Browser browser)
Retrieves the plates containing this image.default java.util.List<Project>
getProjects(Browser browser)
Retrieves the projects containing this image.java.util.List<Folder>
getROIFolders(DataManager dm)
Gets the list of folders linked to the ROIs in this image.java.util.List<ROI>
getROIs(DataManager dm)
Gets all ROIs linked to the image in OMEROdefault java.util.List<Screen>
getScreens(Browser browser)
Retrieves the screens containing this imagejava.awt.image.BufferedImage
getThumbnail(ConnectionHandler client, int size)
Retrieves the image thumbnail of the specified size.default java.util.List<Well>
getWells(Browser browser)
Retrieves the wells containing this image.default boolean
isOrphaned(Browser browser)
Checks if image is orphaned (not in a WellSample nor linked to a dataset).default java.util.List<ROI>
saveROIs(DataManager dm, ROI... rois)
Links ROIs to the image in OMERO.java.util.List<ROI>
saveROIs(DataManager dm, java.util.Collection<? extends ROI> rois)
Links ROIs to the image in OMERO.void
setDescription(java.lang.String description)
Sets the description of the image.void
setName(java.lang.String name)
Sets the name of the image.default ImagePlus
toImagePlus(Client client)
Generates the ImagePlus from the ij library corresponding to the image from OMERO WARNING : you need to include the ij library to use this functionImagePlus
toImagePlus(Client client, int[] xBounds, int[] yBounds, int[] cBounds, int[] zBounds, int[] tBounds)
Gets the imagePlus generated from the image from OMERO corresponding to the bound.default ImagePlus
toImagePlus(Client client, ROI roi)
Gets the imagePlus from the image generated from the ROI.-
Methods inherited from interface fr.igred.omero.Annotatable
addAndReplaceFile, addAndReplaceFile, addAndReplaceTable, addAndReplaceTable, addFile, addKeyValuePair, addTable, addTag, addTag, addTags, copyAnnotationLinks, getAnnotationData, getAnnotations, getFileAnnotations, getKeyValuePairs, getMapAnnotations, getMyRating, getTable, getTables, getTags, getValues, isLinked, link, link, linkIfNotLinked, rate, unlink
-
Methods inherited from interface fr.igred.omero.RemoteObject
canAnnotate, canChgrp, canChown, canDelete, canEdit, canLink, getCreated, getGroupId, getId, getOwner, saveAndUpdate
-
Methods inherited from interface fr.igred.omero.RepositoryObject
getDescription, getName
-
-
-
-
Method Detail
-
asDataObject
ImageData asDataObject()
Returns aImageData
corresponding to the handled object.- Specified by:
asDataObject
in interfaceRemoteObject
- Returns:
- See above.
-
setName
void setName(java.lang.String name)
Sets the name of the image.- Parameters:
name
- The name of the image. Mustn't benull
.- Throws:
java.lang.IllegalArgumentException
- If the name isnull
.
-
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.
-
getProjects
default java.util.List<Project> getProjects(Browser browser) throws ServerException, ServiceException, AccessException, java.util.concurrent.ExecutionException
Retrieves the projects containing this image.- Specified by:
getProjects
in interfaceContainerLinked
- Parameters:
browser
- The data browser.- 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.
-
getDatasets
default java.util.List<Dataset> getDatasets(Browser browser) throws ServerException, ServiceException, AccessException, java.util.concurrent.ExecutionException
Retrieves the datasets containing this image- Specified by:
getDatasets
in interfaceContainerLinked
- Parameters:
browser
- The data browser.- 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.
-
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 interfaceImageLinked
- 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 interfaceHCSLinked
- 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.
-
getPlateAcquisitions
default java.util.List<PlateAcquisition> getPlateAcquisitions(Browser browser) throws AccessException, ServiceException, java.util.concurrent.ExecutionException
Returns the plate acquisitions linked to this image.- Specified by:
getPlateAcquisitions
in interfaceHCSLinked
- 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 interfaceHCSLinked
- 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.
-
getScreens
default java.util.List<Screen> getScreens(Browser browser) throws AccessException, ServiceException, java.util.concurrent.ExecutionException, ServerException
Retrieves the screens containing this image- Specified by:
getScreens
in interfaceHCSLinked
- 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.ServerException
- Server error.
-
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.
-
getFolders
default java.util.List<Folder> getFolders(Browser browser) throws ServiceException, AccessException, java.util.concurrent.ExecutionException, ServerException
Gets the list of folders linked to this image.- 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.ServerException
- Server error.
-
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.
-
-