| 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.Voxel
|
+--ncsa.horizon.util.VolumeIterator
This class allows one to actually access data from an N-dimensional array as specified by a Volume object taking into a account the data sampling and order. (The Volume's interpretation flags are ignored.) This is done via 3 basic actions:
Because a VolumeIterator is a Voxel, it can be passed to any method that takes a Voxel as an argument.
| Field Summary | |
| double[] | first
the first voxel in the volume |
| double[] | last
the last voxel in the volume |
| boolean | noMore
true if the iterator has stepped out of range of the volume. |
| int[] | order
the order of the axes |
| double[] | samp
the sampling to use when iterating through the volume |
| Fields inherited from class ncsa.horizon.util.Voxel | |
| MAX_AXIS_POSITION | |
| Constructor Summary | |
| VolumeIterator(Volume volume,
boolean begin)
create an iterator for a given volume |
|
| VolumeIterator(Volume volume)
create an iterator for a given volume and set it at the volume's first voxel. |
|
| Method Summary | |
| java.lang.Object | clone()
return a clone of this iterator |
| void | decrementRow()
decrement the iterator by one row. |
| void | decrementSlice()
decrement the iterator by one slice. |
| void | decrement(int axis)
decrement the iterator by one sampling unit along the given axis. |
| void | decrement()
decrement the iterator by one voxel. |
| java.util.Observable | getMonitor()
return an Observable monitor for listening for changes to this Voxel. |
| int[] | getPosRef()
get a reference to the integer array pointing to the current position. |
| void | incrementRow()
increment the iterator by one row. |
| void | incrementSlice()
increment the iterator by one slice. |
| void | increment(int axis)
increment the iterator by one sampling unit along the given axis The input is the "reordered" axis index in that the axis ordering specified by the volume will be applied to it. |
| void | increment()
increment the iterator by one voxel. |
| boolean | isMutable()
return true if the position of this Voxel can change |
| boolean | isValid()
return true if the iterator currently points to a valid voxel from the volume, or false if there are no more voxels. |
| void | setAtFirst()
set iterator at the first voxel |
| void | setAtLast()
set iterator at the first voxel |
| Methods inherited from class ncsa.horizon.util.Voxel | |
| add, axisPos, clone, doubleToInt, equals, equals, getExactPos, getExactPos, getMonitor, getNaxes, getPos, getPos, getValues, hashCode, intToDouble, isMutable, roundDoubleToInt, roundToInt, subtract, toString | |
| Methods inherited from class java.lang.Object | |
| clone, equals, finalize, getClass, hashCode, notifyAll, notify, toString, wait, wait, wait | |
| Field Detail |
protected double[] first
protected double[] last
protected double[] samp
protected int[] order
protected boolean noMore
| Constructor Detail |
public VolumeIterator(Volume volume,
boolean begin)
volume
- the volume to iterate through
begin
- true if the iterator should be initially set to the
first voxel in the volume; false if it should be set
to the last voxel (for incrementing in reverse).public VolumeIterator(Volume volume)
volume
- the volume to iterate through| Method Detail |
public boolean isMutable()
public java.util.Observable getMonitor()
public final int[] getPosRef()
public void increment(int axis)
public void increment()
public void incrementRow()
public void incrementSlice()
public void decrement(int axis)
public void decrement()
public void decrementRow()
public void decrementSlice()
public boolean isValid()
public void setAtFirst()
public void setAtLast()
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 | ||