public class DefaultWritableLine extends AbstractRealInterval implements WritableLine
max, minn| 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, toStringnumDimensionsclone, finalize, getClass, notify, notifyAll, wait, wait, waitboundaryType, equals, hashCode, maskTypeand, isEmpty, minus, or, realMax, realMax, realMin, realMin, transform, xorisAll, knownConstantnumDimensionsmaxAsDoubleArray, maxAsRealPoint, minAsDoubleArray, minAsRealPoint, realMax, realMinpublic 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 LineendpointOne in interface WritableLinepublic RealLocalizableRealPositionable endpointTwo()
RealLocalizableRealPositionable positioned at the same
location as the second location passed to the constructor.endpointTwo in interface LineendpointTwo in interface WritableLinepublic boolean equals(Object obj)
Lineequals in interface Lineequals in interface MaskPredicate<RealLocalizable>equals in class Objectobj - The line to compare with this one.MaskPredicate.equals(Object),
Line.equals(Line, Line)Copyright © 2015–2022 ImgLib2. All rights reserved.