| 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.Volume
|
+--ncsa.horizon.util.Segment
|
+--ncsa.horizon.util.AdjustableSegment
This class provides methods for changing a segment's position, size, and sampling. Only the number of axes in the space in which this Segment lives is immutable, being set at construction.
| Inner classes inherited from class ncsa.horizon.util.Volume | |
| Volume.IndexOrder | |
| Fields inherited from class ncsa.horizon.util.Volume | |
| CAN_EXTRAPOLATE, CAN_INTERPOLATE, flags, loc, naxes, NONE, order, sample, size | |
| Constructor Summary | |
| AdjustableSegment(int nax,
int laxis)
create a Segment object in which all the lengths of all sides have a length of one. |
|
| AdjustableSegment(int nax)
create a Segment object of unit size and nax dimensions; the first two axes are assumed to be the ones defining the segment plane. |
|
| AdjustableSegment(Voxel vox,
int len,
int longaxis)
create a Segment object located at a given Voxel and of given length. |
|
| AdjustableSegment(Voxel vox,
double len,
int longaxis)
create a Segment object located at a given Voxel and of given length. |
|
| AdjustableSegment(Volume vol,
int longaxis)
create a Segment object from a Volume |
|
| AdjustableSegment(Volume vol)
create a Segment object from a Volume. |
|
| Method Summary | |
| double | getExactLength()
set the length of the Segment along the long axis |
| double | getExactLongAxisOrigin()
set the position of the Segment along the long axis |
| int | getLength()
set the length of the Segment along the long axis |
| int | getLongAxisOrigin()
set the position of the Segment along the long axis |
| double | getLongAxisStride()
set the sampling of the Segment along the long axis |
| java.util.Observable | getMonitor()
return an Observable monitor for listening for changes to this Segment. |
| int | getRoundedLongAxisStride()
set the sampling of the Segment along the long axis |
| boolean | isMutable()
return true if the position of this Voxel can change. |
| void | setLength(double pos)
set the position of the Segment along the long axis |
| void | setLength(int pos)
set the position of the Segment along the long axis |
| void | setLongAxis(int i)
set the long axis to be the given integer, indicating that this axis can be have a length larger than one. |
| void | setLongAxisOrigin(double pos)
set the position of the Segment along the long axis |
| void | setLongAxisOrigin(int pos)
set the position of the Segment along the long axis |
| void | setLongAxisStride(double pos)
set the position of the Segment along the long axis |
| void | setLongAxisStride(int pos)
set the position of the Segment along the long axis |
| void | setOrigin(int[] pos)
set the origin of this Volume to a position given by an array of integers. |
| void | setOrigin(int idx,
int pos)
set one component of the origin of this Volume to a given position along a given axis |
| void | setOrigin(double[] pos)
set the origin of this Volume to a fractional position given by an array of integers. |
| void | setOrigin(int idx,
double pos)
set one component of the origin of this Volume to a given position along a given axis |
| void | setOrigin(Voxel vox)
set the origin of this volume to the position of a given Voxel |
| Methods inherited from class ncsa.horizon.util.Segment | |
| clone, getExactLength, getExactLongAxisOrigin, getLength, getLongAxisOrigin, getLongAxis, getLongAxisStride, getRoundedLongAxisStride, isSegment, laxis, segmentProjection, setLength, setLength, setLongAxisOrigin, setLongAxisOrigin, setLongAxis, setLongAxisStride, setLongAxisStride, toString | |
| Methods inherited from class ncsa.horizon.util.Volume | |
| axisPos, clone, doubleToInt, equals, getAxisOrder, getExactOrigin, getExactOrigin, getExactSize, getExactSize, getFlags, getLength, getLocation, getLocation, getMonitor, getNaxes, getOrigin, getOrigin, getRoundedStride, getRoundedStride, getSampledCount, getSampledSize, getSampledSize, getSampling, getSampling, getSize, getSize, getStep, getStride, getStride, getTrueLength, getTrueSize, getTrueSize, getVoxel, hashCode, includes, includes, includes, includes, intersection, intersects, intToDouble, isEmpty, isInNaturalAxisOrder, isMutable, isSamplingFully, isSamplingPositively, isSamplingWholly, makeLengthsPositive, projection, reorder, reorder, reorder, roundDoubleToInt, samples, sampleWholly, toString, union, union | |
| Methods inherited from class java.lang.Object | |
| clone, equals, finalize, getClass, hashCode, notifyAll, notify, toString, wait, wait, wait | |
| Constructor Detail |
public AdjustableSegment(int nax,
int laxis)
throws java.lang.ArrayIndexOutOfBoundsException
nax
- number of axes in the space in which it exists
laxis
- axis to be considered the long axis (zero-relative).public AdjustableSegment(int nax)
public AdjustableSegment(Voxel vox,
int len,
int longaxis)
throws java.lang.ArrayIndexOutOfBoundsException
vox
- location of volume vertex closest to origin of space
len
- length of Segment along its long axis
public AdjustableSegment(Voxel vox,
double len,
int longaxis)
throws java.lang.ArrayIndexOutOfBoundsException
vox
- location of volume vertex closest to origin of space
len
- length of Segment along its long axis
public AdjustableSegment(Volume vol,
int longaxis)
throws java.lang.ArrayIndexOutOfBoundsException
vol
- volume to segment
longaxis
- axis index of x-axis (zero-relative)public AdjustableSegment(Volume vol)
vol
- the input volume| Method Detail |
public boolean isMutable()
public java.util.Observable getMonitor()
public void setLongAxis(int i)
i
- index of axis using the numbering convention defined when
this object was created.public void setLongAxisOrigin(double pos)
public void setLongAxisOrigin(int pos)
public void setOrigin(int[] pos)
public void setOrigin(int idx,
int pos)
public void setOrigin(double[] pos)
throws PositionOutOfBoundsException
public void setOrigin(int idx,
double pos)
throws PositionOutOfBoundsException
public void setOrigin(Voxel vox)
public void setLength(double pos)
public void setLength(int pos)
public void setLongAxisStride(double pos)
public void setLongAxisStride(int pos)
public final int getLongAxisOrigin()
public final double getExactLongAxisOrigin()
public final int getLength()
public final double getExactLength()
public final int getRoundedLongAxisStride()
public final double getLongAxisStride()
| Overview | Package | Class | Tree | Deprecated | Index | Help | |||
| PREV CLASS | NEXT CLASS | FRAMES | NO FRAMES | ||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||