| Overview | Package | Class | Tree | Deprecated | Index | Help | |||
| PREV CLASS | NEXT CLASS | FRAMES | NO FRAMES | ||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||
java.lang.Object | +--ncsa.horizon.util.Swath
This class describes a line through data space via 2 voxels: the start voxel and the end voxel. As a result, all the restrictions on voxel position range applies to these ends of this line. Also like the Voxel, positions can be fractional.
In this implementation, Swaths are immutable--that is, their endpoints cannot change. (This is a new with Horizon 2.0.) Thus, isMutable() always returns false. When Swath.isMutable() returns false, objects can feel free to share a reference to the Voxel without worry about it changing. In contrast, an AdjustableSwath is change-able (isMutable() returns true). Swath subclasses (like AdjustableSwath) should override their isMutable() methods to return true if they allow the position to change with time.
| Field Summary | |
| MoveableVoxel | end
the ending voxel of the swath |
| MoveableVoxel | start
the starting voxel for the swath |
| Constructor Summary | |
| Swath(Voxel start,
Voxel end)
Create a new Swath given its beginning and ending Voxel. |
|
| Swath(int naxes)
Create a default Swath of zero length |
|
| Swath()
Create a default Swath of zero length in a 2-dimensional space |
|
| Swath(Swath in)
Create a Swath that is a copy of another Swath. |
|
| Method Summary | |
| java.lang.Object | clone()
return a copy |
| boolean | equals(Swath that)
return true if another Swath is the same as this one. |
| int[] | getEndPos()
return the ending position as an array of integers |
| int | getEndPos(int axis)
return the component of the ending position along a given axis |
| Voxel | getEnd()
return (a copy of) the ending Voxel |
| double[] | getExactEndPos()
return the ending position as an array of doubles |
| double | getExactEndPos(int axis)
return the ending position as an array of doubles |
| double[] | getExactStartPos()
return the starting position as an array of doubles |
| double | getExactStartPos(int axis)
return the starting position as an array of doubles |
| double | getLength(int axis)
return the projected length of the swath along a given axis. |
| double | getLength()
return the absolute length of the swath |
| java.util.Observable | getMonitor()
return an Observable monitor for listening for changes to this Volume, or null if this Volume is immutable. |
| Segment | getProjection(int axis)
return projection of the swath onto a given axis in the form of a Segment object. |
| int[] | getStartPos()
return the starting position as an array of integers |
| int | getStartPos(int axis)
return the component of the starting position along a given axis |
| Voxel | getStart()
return (a copy of) the starting Voxel |
| boolean | isMutable()
return true if the parameters of this Volume can change |
| Methods inherited from class java.lang.Object | |
| clone, equals, finalize, getClass, hashCode, notifyAll, notify, toString, wait, wait, wait | |
| Field Detail |
protected MoveableVoxel start
protected MoveableVoxel end
| Constructor Detail |
public Swath(Voxel start,
Voxel end)
public Swath(int naxes)
naxes
- the dimensionality of the space.public Swath()
public Swath(Swath in)
| Method Detail |
public boolean isMutable()
public java.util.Observable getMonitor()
public Voxel getStart()
public int[] getStartPos()
public int getStartPos(int axis)
public double[] getExactStartPos()
public double getExactStartPos(int axis)
public Voxel getEnd()
public int[] getEndPos()
public int getEndPos(int axis)
public double[] getExactEndPos()
public double getExactEndPos(int axis)
public Segment getProjection(int axis)
axis
- the zero-relative axis index.public double getLength(int axis)
axis
- the zero-relative axis index.public double getLength()
axis
- the zero-relative axis index.public boolean equals(Swath that)
public java.lang.Object clone()
| Overview | Package | Class | Tree | Deprecated | Index | Help | |||
| PREV CLASS | NEXT CLASS | FRAMES | NO FRAMES | ||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||