public interface OMEROService extends ImageJService
Modifier and Type | Method and Description |
---|---|
void |
addROIMapping(Object roi,
ROIData shape)
Add a mapping between a ROIs originating from ImageJ and an OMERO
ROIData . |
void |
clearROIMappings()
Removes all
Object ROIData mappings. |
List<ROIData> |
convertOMEROROI(TreeNode<?> dataNodeRois,
Interval interval)
|
TableData |
convertOMEROTable(Table<?,?> imageJTable)
Converts the given ImageJ table to an OMERO table, but does not save the
table to the server.
|
OMEROSession |
createSession(OMEROLocation location)
Creates an OMEROSession.
|
Dataset |
downloadImage(client client,
long imageID)
Downloads the image with the given image ID from OMERO, storing the result
into a new ImageJ
Dataset . |
ROITree |
downloadROI(OMEROLocation credentials,
long roiID)
|
ROITree |
downloadROIs(OMEROLocation credentials,
long imageID)
Downloads the ROIs associated with the given
imageID from OMERO,
and returns them as a ROITree . |
Table<?,?> |
downloadTable(OMEROLocation credentials,
long tableID)
Downloads the table with the given ID from OMERO, storing the result into a
new ImageJ
Table . |
List<Table<?,?>> |
downloadTables(OMEROLocation credentials,
long imageID)
Downloads all tables associated with the given image ID in OMERO.
|
Param |
getJobParam(ModuleItem<?> item)
Converts an ImageJ module parameter to an OMERO job parameter.
|
ROIData |
getROIMapping(Object key)
Retrieve the
ROIData associated with this key. |
Set<Object> |
getROIMappingKeys()
Returns all the keys for mapped ROIs.
|
ROIData |
getUpdatedServerROIData(long roiDataId)
Returns the most recently retrieved
ROIData object with the given
ID. |
RType |
prototype(Class<?> type)
Creates an OMERO parameter prototype for the given Java class.
|
void |
removeROIMapping(Object key)
Removes the
Object ROIData mapping associated with the
given key from the stored ROIs. |
void |
removeSession(OMEROSession session)
Remove the specified
OMEROSession for the cache of stored sessions. |
OMEROSession |
session()
Returns the
OMEROSession related to the running thread. |
OMEROSession |
session(OMEROLocation location)
Returns an
OMEROSession using the given OMEROLocation . |
Object |
toImageJ(client client,
RType value,
Class<?> type)
Converts an OMERO parameter value to an ImageJ value of the given type.
|
Object |
toOMERO(client client,
Object value)
Converts an ImageJ parameter value to an OMERO parameter value.
|
RType |
toOMERO(Object value)
Converts an ImageJ parameter value to an OMERO parameter value.
|
Collection<ROIData> |
updateAndReturnROIs(OMEROLocation credentials,
TreeNode<?> ijROIs,
long imageID)
Converts the given
TreeNode to OMERO ROI(s), creating new Objects
on the server only for ROIs which didn't previously exist. |
long[] |
updateROIs(OMEROLocation credentials,
TreeNode<?> ijROIs,
long imageID)
Converts the given
TreeNode to OMERO ROIs(s). |
Collection<ROIData> |
uploadAndReturnROIs(OMEROLocation credentials,
TreeNode<?> ijROIs,
long imageID)
Converts the given
TreeNode to OMERO ROI(s), and uploads them all
as new Objects to the server. |
long |
uploadImage(client client,
Dataset dataset)
Uploads the given ImageJ
Dataset 's image to OMERO, returning the
new image ID on the OMERO server. |
void |
uploadImage(OMEROLocation credentials,
Dataset image,
boolean uploadROIs,
TreeNode<?> rois,
boolean updateROIs,
boolean uploadTables,
List<Table<?,?>> tables,
String[] tableNames,
long omeroDatasetID)
Uploads the given image to OMERO, and optionally uploads the given ROIs and
tables.
|
void |
uploadImageAttachments(OMEROLocation credentials,
long imageID,
boolean uploadROIs,
boolean updateROIs,
boolean uploadTables,
TreeNode<?> rois,
List<Table<?,?>> tables,
String[] tableNames)
Uploads the attachments to the OMERO server, and attaches them to the image
associated with the given id.
|
long[] |
uploadROIs(OMEROLocation credentials,
TreeNode<?> ijROIs,
long imageID)
Converts the given
TreeNode to OMERO ROI(s), uploads them to the
OMEROServer, and attaches them to the image with the specified ID. |
long |
uploadTable(OMEROLocation credentials,
String name,
Table<?,?> imageJTable,
long imageID)
Uploads an ImageJ table to OMERO, returning the new table ID on the OMERO
server.
|
initialize, registerEventHandlers
getIdentifier, log
context, getContext, setContext
compareTo, getPriority, setPriority
getInfo, setInfo
getLocation
getVersion
dispose
Param getJobParam(ModuleItem<?> item)
RType prototype(Class<?> type)
RType toOMERO(Object value)
This method only handles basic types, not image types; see
toOMERO(omero.client, Object)
for details.
Object toOMERO(client client, Object value) throws ServerError, IOException, Glacier2.PermissionDeniedException, Glacier2.CannotCreateSessionException, ExecutionException, DSOutOfServiceException, DSAccessException, NumberFormatException, URISyntaxException
If the given object is an image type (i.e., Dataset
,
DatasetView
or ImageDisplay
) then the uploadImage(net.imagej.omero.OMEROLocation, net.imagej.Dataset, boolean, org.scijava.util.TreeNode<?>, boolean, boolean, java.util.List<org.scijava.table.Table<?, ?>>, java.lang.String[], long)
method will be used transparently to convert the object into an OMERO image
ID.
DSAccessException
DSOutOfServiceException
ExecutionException
Glacier2.CannotCreateSessionException
Glacier2.PermissionDeniedException
ServerError
IOException
NumberFormatException
URISyntaxException
Object toImageJ(client client, RType value, Class<?> type) throws ServerError, IOException, Glacier2.PermissionDeniedException, Glacier2.CannotCreateSessionException, SecurityException, DSOutOfServiceException, ExecutionException, DSAccessException
If the requested type is an image type (i.e., Dataset
,
DatasetView
or ImageDisplay
) then the
downloadImage(omero.client, long)
method will be used transparently to convert the
OMERO image ID into such an object.
ServerError
IOException
Glacier2.PermissionDeniedException
Glacier2.CannotCreateSessionException
SecurityException
DSOutOfServiceException
ExecutionException
DSAccessException
void uploadImage(OMEROLocation credentials, Dataset image, boolean uploadROIs, TreeNode<?> rois, boolean updateROIs, boolean uploadTables, List<Table<?,?>> tables, String[] tableNames, long omeroDatasetID) throws ServerError, IOException, ExecutionException, DSOutOfServiceException, DSAccessException, Glacier2.PermissionDeniedException, Glacier2.CannotCreateSessionException
ServerError
IOException
ExecutionException
DSOutOfServiceException
DSAccessException
Glacier2.PermissionDeniedException
Glacier2.CannotCreateSessionException
void uploadImageAttachments(OMEROLocation credentials, long imageID, boolean uploadROIs, boolean updateROIs, boolean uploadTables, TreeNode<?> rois, List<Table<?,?>> tables, String[] tableNames) throws ExecutionException, DSOutOfServiceException, DSAccessException, ServerError, Glacier2.PermissionDeniedException, Glacier2.CannotCreateSessionException
ExecutionException
DSOutOfServiceException
DSAccessException
ServerError
Glacier2.PermissionDeniedException
Glacier2.CannotCreateSessionException
Dataset downloadImage(client client, long imageID) throws ServerError, IOException
Dataset
.ServerError
IOException
long uploadImage(client client, Dataset dataset) throws ServerError, IOException
Dataset
's image to OMERO, returning the
new image ID on the OMERO server.ServerError
IOException
long uploadTable(OMEROLocation credentials, String name, Table<?,?> imageJTable, long imageID) throws ServerError, Glacier2.PermissionDeniedException, Glacier2.CannotCreateSessionException, ExecutionException, DSOutOfServiceException, DSAccessException
ServerError
Glacier2.PermissionDeniedException
Glacier2.CannotCreateSessionException
ExecutionException
DSOutOfServiceException
DSAccessException
TableData convertOMEROTable(Table<?,?> imageJTable)
Table<?,?> downloadTable(OMEROLocation credentials, long tableID) throws ServerError, Glacier2.PermissionDeniedException, Glacier2.CannotCreateSessionException, ExecutionException, DSOutOfServiceException, DSAccessException
Table
.ServerError
Glacier2.PermissionDeniedException
Glacier2.CannotCreateSessionException
ExecutionException
DSOutOfServiceException
DSAccessException
List<Table<?,?>> downloadTables(OMEROLocation credentials, long imageID) throws ExecutionException, DSOutOfServiceException, DSAccessException, ServerError, Glacier2.PermissionDeniedException, Glacier2.CannotCreateSessionException
ExecutionException
DSOutOfServiceException
DSAccessException
ServerError
Glacier2.PermissionDeniedException
Glacier2.CannotCreateSessionException
ROITree downloadROIs(OMEROLocation credentials, long imageID) throws ServerError, Glacier2.PermissionDeniedException, Glacier2.CannotCreateSessionException, ExecutionException, DSOutOfServiceException, DSAccessException
imageID
from OMERO,
and returns them as a ROITree
.ServerError
Glacier2.PermissionDeniedException
Glacier2.CannotCreateSessionException
ExecutionException
DSOutOfServiceException
DSAccessException
ROITree downloadROI(OMEROLocation credentials, long roiID) throws DSOutOfServiceException, DSAccessException, ExecutionException
long[] uploadROIs(OMEROLocation credentials, TreeNode<?> ijROIs, long imageID) throws ExecutionException, DSOutOfServiceException, DSAccessException
TreeNode
to OMERO ROI(s), uploads them to the
OMEROServer, and attaches them to the image with the specified ID. All ROIs
are uploaded as new Objects, regardless of their origin.long[] updateROIs(OMEROLocation credentials, TreeNode<?> ijROIs, long imageID) throws ExecutionException, DSOutOfServiceException, DSAccessException
TreeNode
to OMERO ROIs(s). ROIs which originated
from OMERO are updated on the server, and new ROIs are uploaded. The ids of
the new ROI objects is returned.Collection<ROIData> uploadAndReturnROIs(OMEROLocation credentials, TreeNode<?> ijROIs, long imageID) throws ExecutionException, DSOutOfServiceException, DSAccessException
TreeNode
to OMERO ROI(s), and uploads them all
as new Objects to the server. The new OMERO objects are then returned.Collection<ROIData> updateAndReturnROIs(OMEROLocation credentials, TreeNode<?> ijROIs, long imageID) throws ExecutionException, DSOutOfServiceException, DSAccessException
TreeNode
to OMERO ROI(s), creating new Objects
on the server only for ROIs which didn't previously exist. ROIs which
originated from OMERO are updated on the server. A collection of the new
ROI objects is returned.List<ROIData> convertOMEROROI(TreeNode<?> dataNodeRois, Interval interval)
TreeNode
to ROIData
. If an interval is
provided it will be used to convert unbounded MaskPredicate
s to
ROIData
. If the interval is null, then unbounded
MaskPredicate
s cannot be converted to ROIData
and an
exception is thrown.ROIData getUpdatedServerROIData(long roiDataId)
ROIData
object with the given
ID. If no such mapping exists null
is returned.
When a ROIData object is updated and the new version uploaded to the OMERO
server, previous ROIData objects become "locked" and subsequent attempts to
update and upload new versions of them to OMERO will result in
OptimisticLockException
. Therefore, pairings of the
id and the update OMERO server ROIData object must be stored.
void addROIMapping(Object roi, ROIData shape)
ROIData
.ROIData getROIMapping(Object key)
ROIData
associated with this key. Returns null
if there's no mapping.void removeROIMapping(Object key)
Object
ROIData
mapping associated with the
given key from the stored ROIs.void clearROIMappings()
Object
ROIData
mappings.OMEROSession session(OMEROLocation location)
OMEROSession
using the given OMEROLocation
. If a
session with this location already exists it is returned, if not a new one
is created.location
- OMEROLocationOMEROSession session()
OMEROSession
related to the running thread.OMEROSession createSession(OMEROLocation location)
location
- OMEROLocation to be used to create the sessionvoid removeSession(OMEROSession session)
OMEROSession
for the cache of stored sessions.session
- The session to be removedCopyright © 2014–2022 ImageJ. All rights reserved.