Package fr.igred.omero.roi
Class ROIWrapper
- java.lang.Object
-
- fr.igred.omero.ObjectWrapper<T>
-
- fr.igred.omero.AnnotatableWrapper<ROIData>
-
- fr.igred.omero.roi.ROIWrapper
-
- All Implemented Interfaces:
Annotatable,RemoteObject,ROI
public class ROIWrapper extends AnnotatableWrapper<ROIData> implements ROI
Class containing a ROIData object.Wraps function calls to the ROIData contained.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringANNOTATION_LINKAnnotation link name for this type of object-
Fields inherited from class fr.igred.omero.ObjectWrapper
data
-
Fields inherited from interface fr.igred.omero.roi.ROI
IJ_PROPERTY
-
-
Constructor Summary
Constructors Constructor Description ROIWrapper()Constructor of the ROIWrapper class.ROIWrapper(java.lang.Iterable<? extends Shape> shapes)Constructor of the ROIWrapper class.ROIWrapper(ROIData roi)Constructor of the ROIWrapper class.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddShape(Shape shape)Adds a Shape to the ROI.protected java.lang.StringannotationLinkType()Returns the type of annotation link for this object.voiddeleteShape(int pos)Deletes a shape from the ROI.voiddeleteShape(ShapeData shape)Deletes a ShapeData from the ROI.static java.util.List<ROI>fromImageJ(java.util.Collection<? extends Roi> ijRois)Converts a collection of ImageJ ROIs to a list of OMERO ROIsstatic java.util.List<ROI>fromImageJ(java.util.Collection<? extends Roi> ijRois, java.lang.String property)Converts a collection of ImageJ ROIs to a list of OMERO ROIsjava.lang.StringgetName()Gets the ROI name.java.util.List<Shape>getShapes()Returns the list of shapes contained in the ROI.voidsaveROI(DataManager dm)Saves the ROI.voidsetImage(Image image)Sets the image linked to the ROI.voidsetName(java.lang.String name)Sets the ROI name.-
Methods inherited from class fr.igred.omero.AnnotatableWrapper
addAndReplaceFile, addAndReplaceTable, addKeyValuePair, addTag, addTag, getAnnotations, getFileAnnotations, getMapAnnotations, getMyRating, getTable, getTags, rate, removeLink, unlink
-
Methods inherited from class fr.igred.omero.ObjectWrapper
asDataObject, canAnnotate, canChgrp, canChown, canDelete, canEdit, canLink, getCreated, getGroupId, getId, getOwner, saveAndUpdate, toString, wrap, wrap
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
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
-
-
-
-
Field Detail
-
ANNOTATION_LINK
public static final java.lang.String ANNOTATION_LINK
Annotation link name for this type of object- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ROIWrapper
public ROIWrapper()
Constructor of the ROIWrapper class.
-
ROIWrapper
public ROIWrapper(java.lang.Iterable<? extends Shape> shapes)
Constructor of the ROIWrapper class.- Parameters:
shapes- List of shapes to add to the ROIData.
-
ROIWrapper
public ROIWrapper(ROIData roi)
Constructor of the ROIWrapper class.- Parameters:
roi- The ROIData to wrap.
-
-
Method Detail
-
fromImageJ
public static java.util.List<ROI> fromImageJ(java.util.Collection<? extends Roi> ijRois)
Converts a collection of ImageJ ROIs to a list of OMERO ROIs- Parameters:
ijRois- A collection of ImageJ ROIs.- Returns:
- The converted list of OMERO ROIs.
-
fromImageJ
public static java.util.List<ROI> fromImageJ(java.util.Collection<? extends Roi> ijRois, java.lang.String property)
Converts a collection of ImageJ ROIs to a list of OMERO ROIs- Parameters:
ijRois- A collection of ImageJ ROIs.property- The property used to store the 4D ROI local index/label. Defaults to "ROI" if null or empty.- Returns:
- The converted list of OMERO ROIs.
-
getName
public java.lang.String getName()
Gets the ROI name.
-
setName
public void setName(java.lang.String name)
Sets the ROI name.
-
addShape
public void addShape(Shape shape)
Adds a Shape to the ROI.
-
getShapes
public java.util.List<Shape> getShapes()
Returns the list of shapes contained in the ROI.
-
setImage
public void setImage(Image image)
Sets the image linked to the ROI.
-
deleteShape
public void deleteShape(ShapeData shape)
Deletes a ShapeData from the ROI.- Specified by:
deleteShapein interfaceROI- Parameters:
shape- ShapeData to delete.
-
deleteShape
public void deleteShape(int pos)
Deletes a shape from the ROI.- Specified by:
deleteShapein interfaceROI- Parameters:
pos- Position of the ShapeData in the ShapeData list from the ROI.- Throws:
java.lang.IndexOutOfBoundsException- If pos is out of the ShapeData list bounds.
-
saveROI
public void saveROI(DataManager dm) throws ServiceException, AccessException, java.util.concurrent.ExecutionException
Saves the ROI.- Specified by:
saveROIin interfaceROI- Parameters:
dm- The data manager.- Throws:
ServiceException- Cannot connect to OMERO.AccessException- Cannot access data.java.util.concurrent.ExecutionException- A Facility can't be retrieved or instantiated.
-
annotationLinkType
protected java.lang.String annotationLinkType()
Returns the type of annotation link for this object.- Specified by:
annotationLinkTypein classAnnotatableWrapper<ROIData>- Returns:
- See above.
-
-