public class DefaultWritableLine extends AbstractRealInterval implements WritableLine
max, min
n
Constructor and Description |
---|
DefaultWritableLine(double[] pointOne,
double[] pointTwo,
boolean copy)
Creates a line with endpoints at the given positions.
|
DefaultWritableLine(RealLocalizable pointOne,
RealLocalizable pointTwo)
Creates a line with endpoints at the given positions.
|
Modifier and Type | Method and Description |
---|---|
RealLocalizableRealPositionable |
endpointOne()
Returns a
RealLocalizableRealPositionable positioned at the same
location as the first location passed to the constructor. |
RealLocalizableRealPositionable |
endpointTwo()
Returns a
RealLocalizableRealPositionable positioned at the same
location as the second location passed to the constructor. |
boolean |
equals(Object obj)
Determines whether this line describes the same region as another one.
|
int |
hashCode() |
boolean |
test(RealLocalizable l) |
realMax, realMax, realMax, realMin, realMin, realMin, toString
numDimensions
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
boundaryType, equals, hashCode, maskType
and, isEmpty, minus, or, realMax, realMax, realMin, realMin, transform, xor
isAll, knownConstant
numDimensions
maxAsDoubleArray, maxAsRealPoint, minAsDoubleArray, minAsRealPoint, realMax, realMin
public DefaultWritableLine(RealLocalizable pointOne, RealLocalizable pointTwo)
pointOne
- The position of the first point. This position will be copied
and stored as a double[]
. This is the position which
will be returned by endpointOne()
.pointTwo
- The position of the second point. This position will be copied
and stored as a double[]
. This is the position which
will be returned by endpointTwo()
.public DefaultWritableLine(double[] pointOne, double[] pointTwo, boolean copy)
pointOne
and pointTwo
do not have the same length, the dimensionality of
the space is the smaller of the two. If the arrays have uneven lengths
the arrays will be copied and truncated, regardless of the value of
copy
.pointOne
- The position of the first point. This is the position which
will be returned by endpointOne()
.pointTwo
- The position of the second point.This is the position which
will be returned by endpointTwo()
.copy
- If true, pointOne and pointTwo arrays are copied and stored.
If false, copies are not made.public boolean test(RealLocalizable l)
test
in interface Predicate<RealLocalizable>
public RealLocalizableRealPositionable endpointOne()
RealLocalizableRealPositionable
positioned at the same
location as the first location passed to the constructor.endpointOne
in interface Line
endpointOne
in interface WritableLine
public RealLocalizableRealPositionable endpointTwo()
RealLocalizableRealPositionable
positioned at the same
location as the second location passed to the constructor.endpointTwo
in interface Line
endpointTwo
in interface WritableLine
public boolean equals(Object obj)
Line
equals
in interface Line
equals
in interface MaskPredicate<RealLocalizable>
equals
in class Object
obj
- The line to compare with this one.MaskPredicate.equals(Object)
,
Line.equals(Line, Line)
Copyright © 2015–2022 ImgLib2. All rights reserved.