Class FeatureInputPairObjects
Object
org.anchoranalysis.feature.input.FeatureInputDimensions
org.anchoranalysis.feature.input.FeatureInputEnergy
org.anchoranalysis.image.feature.input.FeatureInputPairObjects
- All Implemented Interfaces:
FeatureInput,FeatureInputDictionary,FeatureInputWithResolution
public class FeatureInputPairObjects extends FeatureInputEnergy
A pair of objects (first and second) and optionally a merged version of both.
Note that first and second simply identify two parts of the pair (tuple). It has no physical meaning related to where the objects are located in the scene.
If a merged version doesn't exist, it is created and cached on demand.
- Author:
- Owen Feehan
-
Constructor Summary
Constructors Modifier Constructor Description protectedFeatureInputPairObjects(FeatureInputPairObjects src)Copy constructor for FeatureInputPairObjects.FeatureInputPairObjects(org.anchoranalysis.image.voxel.object.ObjectMask first, org.anchoranalysis.image.voxel.object.ObjectMask second)Constructs a FeatureInputPairObjects with two ObjectMasks.FeatureInputPairObjects(org.anchoranalysis.image.voxel.object.ObjectMask first, org.anchoranalysis.image.voxel.object.ObjectMask second, Optional<EnergyStack> energyStack)Constructs a FeatureInputPairObjects with two ObjectMasks and an optional EnergyStack.FeatureInputPairObjects(org.anchoranalysis.image.voxel.object.ObjectMask first, org.anchoranalysis.image.voxel.object.ObjectMask second, Optional<EnergyStack> energyStack, Optional<org.anchoranalysis.image.voxel.object.ObjectMask> merged)Constructs a FeatureInputPairObjects with two ObjectMasks, an optional EnergyStack, and an optional merged ObjectMask.FeatureInputPairObjects(org.anchoranalysis.image.voxel.object.ObjectMask first, org.anchoranalysis.image.voxel.object.ObjectMask second, EnergyStack energyStack)Constructs a FeatureInputPairObjects with two ObjectMasks and an EnergyStack. -
Method Summary
Modifier and Type Method Description protected booleancanEqual(Object other)booleanequals(Object o)org.anchoranalysis.image.voxel.object.ObjectMaskgetFirst()Gets the first ObjectMask.org.anchoranalysis.image.voxel.object.ObjectMaskgetMerged()Returns a merged version of the two objects.Optional<org.anchoranalysis.image.voxel.object.ObjectMask>getMergedOptional()Gets the optional merged ObjectMask.org.anchoranalysis.image.voxel.object.ObjectMaskgetSecond()Gets the second ObjectMask.inthashCode()StringtoString()Returns a string representation of the object.Methods inherited from class org.anchoranalysis.feature.input.FeatureInputEnergy
dimensions, dimensionsOptional, dimensionsRequired, getDictionaryOptional, getEnergyStackOptional, getEnergyStackRequired, getResolutionOptional, getUnitConverterOptional, setEnergyStack, setEnergyStackMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.anchoranalysis.feature.input.FeatureInputDictionary
getDictionaryRequiredMethods inherited from interface org.anchoranalysis.feature.input.FeatureInputWithResolution
getResolutionRequired
-
Constructor Details
-
FeatureInputPairObjects
public FeatureInputPairObjects(org.anchoranalysis.image.voxel.object.ObjectMask first, org.anchoranalysis.image.voxel.object.ObjectMask second)Constructs a FeatureInputPairObjects with two ObjectMasks.- Parameters:
first- the first ObjectMasksecond- the second ObjectMask
-
FeatureInputPairObjects
public FeatureInputPairObjects(org.anchoranalysis.image.voxel.object.ObjectMask first, org.anchoranalysis.image.voxel.object.ObjectMask second, EnergyStack energyStack)Constructs a FeatureInputPairObjects with two ObjectMasks and an EnergyStack.- Parameters:
first- the first ObjectMasksecond- the second ObjectMaskenergyStack- the EnergyStack
-
FeatureInputPairObjects
public FeatureInputPairObjects(org.anchoranalysis.image.voxel.object.ObjectMask first, org.anchoranalysis.image.voxel.object.ObjectMask second, Optional<EnergyStack> energyStack)Constructs a FeatureInputPairObjects with two ObjectMasks and an optional EnergyStack.- Parameters:
first- the first ObjectMasksecond- the second ObjectMaskenergyStack- an optional EnergyStack
-
FeatureInputPairObjects
public FeatureInputPairObjects(org.anchoranalysis.image.voxel.object.ObjectMask first, org.anchoranalysis.image.voxel.object.ObjectMask second, Optional<EnergyStack> energyStack, Optional<org.anchoranalysis.image.voxel.object.ObjectMask> merged)Constructs a FeatureInputPairObjects with two ObjectMasks, an optional EnergyStack, and an optional merged ObjectMask.- Parameters:
first- the first ObjectMasksecond- the second ObjectMaskenergyStack- an optional EnergyStackmerged- an optional merged ObjectMask
-
FeatureInputPairObjects
Copy constructor for FeatureInputPairObjects.- Parameters:
src- the FeatureInputPairObjects to copy
-
-
Method Details
-
getFirst
public org.anchoranalysis.image.voxel.object.ObjectMask getFirst()Gets the first ObjectMask.- Returns:
- the first ObjectMask
-
getSecond
public org.anchoranalysis.image.voxel.object.ObjectMask getSecond()Gets the second ObjectMask.- Returns:
- the second ObjectMask
-
getMerged
public org.anchoranalysis.image.voxel.object.ObjectMask getMerged()Returns a merged version of the two objects.If a merged version doesn't exist, it is created and cached.
- Returns:
- the merged ObjectMask
-
getMergedOptional
Gets the optional merged ObjectMask.- Returns:
- an Optional containing the merged ObjectMask, or empty if not present
-
toString
Returns a string representation of the object. -
equals
- Overrides:
equalsin classFeatureInputEnergy
-
canEqual
- Overrides:
canEqualin classFeatureInputEnergy
-
hashCode
public int hashCode()- Overrides:
hashCodein classFeatureInputEnergy
-