Package omero.gateway.facility
Class ROIFacility
- java.lang.Object
-
- omero.gateway.facility.Facility
-
- omero.gateway.facility.ROIFacility
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Map<FolderData,java.util.Collection<ROIData>>
addRoisToFolders(SecurityContext ctx, long imageID, java.util.Collection<ROIData> roiList, java.util.Collection<FolderData> folders)
Adds ROIs to Foldersjava.util.Map<FolderData,java.util.Collection<ROIData>>
addRoisToFolders(SecurityContext ctx, long imageID, java.util.Collection<ROIData> roiList, java.util.Collection<FolderData> folders, boolean removeFromOtherFolders)
Adds ROIs to Foldersint
getROICount(SecurityContext ctx, long imageId)
Get the number of ROIs for an image (-1
in case of error)java.util.Collection<FolderData>
getROIFolders(SecurityContext ctx, long imageId)
Get all ROI folders for a certain imageROIResult
loadROI(SecurityContext ctx, long roiId)
Loads the ROIjava.util.List<ROIResult>
loadROIs(SecurityContext ctx, long imageID)
Loads the ROI related to the specified image.java.util.List<ROIResult>
loadROIs(SecurityContext ctx, long imageID, java.util.List<java.lang.Long> measurements)
Loads the ROI related to the specified image.java.util.List<ROIResult>
loadROIs(SecurityContext ctx, long imageID, java.util.List<java.lang.Long> measurements, long userID)
Loads the ROI related to the specified image.java.util.List<ROIResult>
loadROIsByPlane(SecurityContext ctx, long imageID, int z, int t)
Loads the ROI related to the specified image.java.util.Collection<ROIResult>
loadROIsForFolder(SecurityContext ctx, long imageId, long folderId)
Get all ROIs which are part of a certain foldervoid
removeRoisFromFolders(SecurityContext ctx, long imageID, java.util.Collection<ROIData> roiList, java.util.Collection<FolderData> folders)
Remove the ROIs from the foldersjava.util.Collection<ROIData>
saveROIs(SecurityContext ctx, long imageID, long userID, java.util.Collection<ROIData> roiList)
Save the ROI for the image to the server.java.util.Collection<ROIData>
saveROIs(SecurityContext ctx, long imageID, java.util.Collection<ROIData> roiList)
Save the ROI for the image to the server.-
Methods inherited from class omero.gateway.facility.Facility
addPropertyChangeListener, clear, firePropertyChanged, firePropertyChanged, getFacility, logDebug, logError, logInfo, logWarn, removePropertyChangeListener
-
-
-
-
Method Detail
-
getROICount
public int getROICount(SecurityContext ctx, long imageId) throws DSOutOfServiceException, DSAccessException
Get the number of ROIs for an image (-1
in case of error)- Parameters:
ctx
- TheSecurityContext
imageId
- The image Id- Returns:
- See above
- Throws:
DSOutOfServiceException
DSAccessException
-
loadROI
public ROIResult loadROI(SecurityContext ctx, long roiId) throws DSOutOfServiceException, DSAccessException
Loads the ROI- Parameters:
ctx
- The security context.roiId
- The ROI's id.- Returns:
- See above.
- Throws:
DSOutOfServiceException
- If the connection is broken, or not logged inDSAccessException
- If an error occurred while trying to retrieve data from OMERO service.
-
loadROIsByPlane
public java.util.List<ROIResult> loadROIsByPlane(SecurityContext ctx, long imageID, int z, int t) throws DSOutOfServiceException, DSAccessException
Loads the ROI related to the specified image.- Parameters:
ctx
- The security context.imageID
- The image's ID.z
- The selection z-section.t
- The selection timepoint.- Returns:
- See above.
- Throws:
DSOutOfServiceException
- If the connection is broken, or not logged inDSAccessException
- If an error occurred while trying to retrieve data from OMERO service.
-
loadROIs
public java.util.List<ROIResult> loadROIs(SecurityContext ctx, long imageID) throws DSOutOfServiceException, DSAccessException
Loads the ROI related to the specified image.- Parameters:
ctx
- The security context.imageID
- The image's ID.- Returns:
- See above.
- Throws:
DSOutOfServiceException
- If the connection is broken, or not logged inDSAccessException
- If an error occurred while trying to retrieve data from OMERO service.
-
loadROIs
public java.util.List<ROIResult> loadROIs(SecurityContext ctx, long imageID, java.util.List<java.lang.Long> measurements) throws DSOutOfServiceException, DSAccessException
Loads the ROI related to the specified image.- Parameters:
ctx
- The security context.imageID
- The image's ID.measurements
- The measurements IDs linked to the image if any.- Returns:
- See above.
- Throws:
DSOutOfServiceException
- If the connection is broken, or logged in.DSAccessException
- If an error occurred while trying to retrieve data from OMEDS service.
-
loadROIs
public java.util.List<ROIResult> loadROIs(SecurityContext ctx, long imageID, java.util.List<java.lang.Long> measurements, long userID) throws DSOutOfServiceException, DSAccessException
Loads the ROI related to the specified image.- Parameters:
ctx
- The security context.imageID
- The image's ID.measurements
- The measurements IDs linked to the image if any.userID
- The user's ID.- Returns:
- See above.
- Throws:
DSOutOfServiceException
- If the connection is broken, or not logged inDSAccessException
- If an error occurred while trying to retrieve data from OMERO service.
-
saveROIs
public java.util.Collection<ROIData> saveROIs(SecurityContext ctx, long imageID, java.util.Collection<ROIData> roiList) throws DSOutOfServiceException, DSAccessException
Save the ROI for the image to the server.- Parameters:
ctx
- The security context.imageID
- The image's ID.roiList
- The list of ROI to save.- Returns:
- updated list of ROIData objects.
- Throws:
DSOutOfServiceException
- If the connection is broken, or not logged inDSAccessException
- If an error occurred while trying to retrieve data from OMERO service.
-
addRoisToFolders
public java.util.Map<FolderData,java.util.Collection<ROIData>> addRoisToFolders(SecurityContext ctx, long imageID, java.util.Collection<ROIData> roiList, java.util.Collection<FolderData> folders) throws DSOutOfServiceException, DSAccessException
Adds ROIs to Folders- Parameters:
ctx
- TheSecurityContext
imageID
- The image idroiList
- The ROIs to add to the Foldersfolders
- The Folders to add the ROIs to- Returns:
- The updated Folders and ROIs
- Throws:
DSOutOfServiceException
DSAccessException
-
addRoisToFolders
public java.util.Map<FolderData,java.util.Collection<ROIData>> addRoisToFolders(SecurityContext ctx, long imageID, java.util.Collection<ROIData> roiList, java.util.Collection<FolderData> folders, boolean removeFromOtherFolders) throws DSOutOfServiceException, DSAccessException
Adds ROIs to Folders- Parameters:
ctx
- TheSecurityContext
imageID
- The image idroiList
- The ROIs to add to the Foldersfolders
- The Folders to add the ROIs toremoveFromOtherFolders
- Passtrue
if the ROIs should only be linked to the specified folders, others will be unlinked.- Returns:
- The updated Folders and ROIs
- Throws:
DSOutOfServiceException
DSAccessException
-
removeRoisFromFolders
public void removeRoisFromFolders(SecurityContext ctx, long imageID, java.util.Collection<ROIData> roiList, java.util.Collection<FolderData> folders) throws DSOutOfServiceException, DSAccessException
Remove the ROIs from the folders- Parameters:
ctx
- TheSecurityContext
imageID
- The image idroiList
- The ROIs to remove from the foldersfolders
- The Folders to remove the ROIs from- Throws:
DSOutOfServiceException
DSAccessException
-
saveROIs
public java.util.Collection<ROIData> saveROIs(SecurityContext ctx, long imageID, long userID, java.util.Collection<ROIData> roiList) throws DSOutOfServiceException, DSAccessException
Save the ROI for the image to the server.- Parameters:
ctx
- The security context.imageID
- The image's ID (can be-1
for ROIs not attached to an image)userID
- The user's ID.roiList
- The list of ROI to save.- Returns:
- updated list of ROIData objects.
- Throws:
DSOutOfServiceException
- If the connection is broken, or not logged inDSAccessException
- If an error occurred while trying to retrieve data from OMERO service.
-
getROIFolders
public java.util.Collection<FolderData> getROIFolders(SecurityContext ctx, long imageId) throws DSOutOfServiceException, DSAccessException
Get all ROI folders for a certain image- Parameters:
ctx
- TheSecurityContext
imageId
- The image id- Returns:
- See above
- Throws:
DSOutOfServiceException
- If the connection is broken, or logged in.DSAccessException
- If an error occurred while trying to retrieve data from OMEDS service.
-
loadROIsForFolder
public java.util.Collection<ROIResult> loadROIsForFolder(SecurityContext ctx, long imageId, long folderId) throws DSOutOfServiceException, DSAccessException
Get all ROIs which are part of a certain folder- Parameters:
ctx
- TheSecurityContext
imageId
- The image idfolderId
- The folder id- Returns:
- See above
- Throws:
DSOutOfServiceException
- If the connection is broken, or logged in.DSAccessException
- If an error occurred while trying to retrieve data from OMEDS service.
-
-