|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.starlink.array.OrderedShapeMapper
public class OrderedShapeMapper
Implements the OffsetMapper interface to map between arrays with different shapes and/or ordering schemes.
Constructor Summary | |
---|---|
OrderedShapeMapper(OrderedNDShape oshape1,
OrderedNDShape oshape2)
Constructs an OffsetMapper which maps between two arrays with different pixel sequences. |
Method Summary | |
---|---|
long |
mapOffset(long off1)
Returns an offset into array 2 corresponding to a given offset in array 1. |
long[] |
mapRange(long[] range1)
Returns a two-element array (min,max) indicating the range of mapping output values (array 2 offsets) which correspond to a given range of input values (array 1 offsets). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public OrderedShapeMapper(OrderedNDShape oshape1, OrderedNDShape oshape2)
oshape1
- ordered shape giving the pixel sequence of array 1oshape2
- ordered shape giving the pixel sequence of array 2Method Detail |
---|
public long mapOffset(long off1)
OffsetMapper
mapOffset
in interface OffsetMapper
off1
- the offset into the array 1 giving a pixel position
public long[] mapRange(long[] range1)
OffsetMapper
OffsetMapper.mapOffset(long)
will not return any value outside of the range returned,
as long as no value outside of the supplied range parameter
is not supplied to it. The returned range is only used
for efficiency purposes and may be conservative (a larger range
than will actually be returned). A null value may be returned;
this, like a return value of {-Long.MIN_VALUE,Long.MAX_VALUE}
constitutes no guarantee about the mapping output values.
mapRange
in interface OffsetMapper
range1
- a two-element array giving the lowest value and highest
value (inclusive) which will be supplied to the
mapOffset method (range to be considered
in array 1)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |