Class AccessObjectMaskSimple
Object
AccessObjectMaskSimple
- All Implemented Interfaces:
AccessObjectMask<ObjectMask>
Provides access to the simple-case of a list of
ObjectMask
s.- Author:
- Owen Feehan
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclipTo
(ObjectMask element, Extent extent) Ensures the element lies within a certain extent.createFrom
(int index, ObjectMask object) Creates an element of typeT
from an object-representation and index.objectFor
(ObjectMask element) An object-mask for a given element.shiftBy
(ObjectMask element, ReadableTuple3i quantity) Positionally-shifts an element by a given quantity in the positive direction.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.anchoranalysis.image.core.object.scale.AccessObjectMask
boundingBoxFor
-
Constructor Details
-
AccessObjectMaskSimple
public AccessObjectMaskSimple()
-
-
Method Details
-
objectFor
Description copied from interface:AccessObjectMask
An object-mask for a given element.This operation is assumed to involve negligible computational cost.
- Specified by:
objectFor
in interfaceAccessObjectMask<ObjectMask>
- Parameters:
element
- the element.- Returns:
- the object-mask.
-
shiftBy
Description copied from interface:AccessObjectMask
Positionally-shifts an element by a given quantity in the positive direction.- Specified by:
shiftBy
in interfaceAccessObjectMask<ObjectMask>
- Parameters:
element
- the element to shift by.quantity
- the quantity to shift by.- Returns:
- a newly created element based on
element
but positionally-shifted.
-
createFrom
Description copied from interface:AccessObjectMask
Creates an element of typeT
from an object-representation and index.- Specified by:
createFrom
in interfaceAccessObjectMask<ObjectMask>
- Parameters:
index
- the index of the object-representation in terms of the original list.object
- an object-representation corresponding to this index.- Returns:
- a newly created element corresponding to the object-representation.
-
clipTo
Description copied from interface:AccessObjectMask
Ensures the element lies within a certain extent.- Specified by:
clipTo
in interfaceAccessObjectMask<ObjectMask>
- Parameters:
element
- the element.extent
- the extent to clip to.- Returns:
- either a newly created element or the existing element (if no change needs to occur).
-