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 FoldersintgetROICount(SecurityContext ctx, long imageId)Get the number of ROIs for an image (-1in case of error)java.util.Collection<FolderData>getROIFolders(SecurityContext ctx, long imageId)Get all ROI folders for a certain imageROIResultloadROI(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 foldervoidremoveRoisFromFolders(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 (-1in case of error)- Parameters:
ctx- TheSecurityContextimageId- The image Id- Returns:
- See above
- Throws:
DSOutOfServiceExceptionDSAccessException
-
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- TheSecurityContextimageID- The image idroiList- The ROIs to add to the Foldersfolders- The Folders to add the ROIs to- Returns:
- The updated Folders and ROIs
- Throws:
DSOutOfServiceExceptionDSAccessException
-
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- TheSecurityContextimageID- The image idroiList- The ROIs to add to the Foldersfolders- The Folders to add the ROIs toremoveFromOtherFolders- Passtrueif the ROIs should only be linked to the specified folders, others will be unlinked.- Returns:
- The updated Folders and ROIs
- Throws:
DSOutOfServiceExceptionDSAccessException
-
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- TheSecurityContextimageID- The image idroiList- The ROIs to remove from the foldersfolders- The Folders to remove the ROIs from- Throws:
DSOutOfServiceExceptionDSAccessException
-
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-1for 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- TheSecurityContextimageId- 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- TheSecurityContextimageId- 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.
-
-