| 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
The "sampled" length is the value returned by Volume.getSampledSize(int). In other words, it is the number of points that are sampled along that access, taking in to account the stride along the axis (see Volume for details). Unit sampled length means that only one data point is sampled along that axis.
See also Voxel, Volume, and Slice.
| 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 | |
| Segment(int nax,
int longaxis)
create a Segment object |
|
| Segment(int nax)
create a Segment object of unit size and nax dimensions; the first axis is assumed to be the long axis. |
|
| Segment(Voxel vox,
int len,
int longaxis)
create a Segment object located at a given Voxel and of given length. |
|
| Segment(Voxel vox,
double len,
int longaxis)
create a Segment object located at a given Voxel and of given length. |
|
| Segment(Volume vol,
int longaxis)
create a Segment object from a Volume |
|
| Segment(Segment seg)
create a Segment from another Segment. |
|
| Segment(Volume vol)
create a Segment object from a Volume. |
|
| Method Summary | |
| java.lang.Object | clone()
|
| double | getExactLength()
get the exact length of the long axis of this Segment. |
| double | getExactLongAxisOrigin()
set the position of the Segment along the long axis |
| int | getLength()
get the length of the long axis of this Segment (rounded to the nearest whole position). |
| int | getLongAxisOrigin()
set the position of the Segment along the long axis |
| int | getLongAxis()
return the currently set long axis |
| double | getLongAxisStride()
set the sampling of the Segment along the long axis |
| int | getRoundedLongAxisStride()
set the sampling of the Segment along the long axis |
| static boolean | isSegment(Volume vol)
return true if no more than one side have unit length |
| int | laxis()
|
| Segment | segmentProjection(Volume vol)
return a Segment that is a projection of a Volume onto the line of this segment. |
| void | setLength(double len)
set the length of the long axis of this Segment |
| void | setLength(int len)
set the length of the long axis of this Segment |
| void | setLongAxisOrigin(double pos)
set the position of the Segment along the x axis |
| void | setLongAxisOrigin(int pos)
set the position of the Segment along the x 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 | setLongAxisStride(double pos)
set the sampling of the Segment along the long axis |
| void | setLongAxisStride(int pos)
set the sampling of the Segment along the long axis |
| java.lang.String | 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 Segment(int nax,
int longaxis)
throws java.lang.ArrayIndexOutOfBoundsException
nax
- number of axes in the space in which it exists
longaxis
- axis to be considered the long axis (zero-relative).public Segment(int nax)
public Segment(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 Segment(Voxel vox,
double len,
int longaxis)
throws java.lang.ArrayIndexOutOfBoundsException,
ValueOutOfBoundsException
vox
- location of volume vertex closest to origin of space
len
- length of Segment along its long axis
public Segment(Volume vol,
int longaxis)
throws java.lang.ArrayIndexOutOfBoundsException
vol
- volume to segment
longaxis
- axis index of x-axis (zero-relative)public Segment(Segment seg)
sl
- the segment to copypublic Segment(Volume vol)
vol
- the input volume| Method Detail |
protected final int laxis()
public static boolean isSegment(Volume vol)
protected void setLongAxis(int i)
i
- index of axis using the numbering convention defined when
this object was created.public int getLongAxis()
public int getLongAxisOrigin()
public double getExactLongAxisOrigin()
protected void setLongAxisOrigin(double pos)
protected void setLongAxisOrigin(int pos)
protected void setLength(double len)
throws ValueOutOfBoundsException
protected void setLength(int len)
public int getLength()
public double getExactLength()
protected void setLongAxisStride(double pos)
protected void setLongAxisStride(int pos)
public int getRoundedLongAxisStride()
public double getLongAxisStride()
public Segment segmentProjection(Volume vol)
public java.lang.Object clone()
public java.lang.String toString()
| Overview | Package | Class | Tree | Deprecated | Index | Help | |||
| PREV CLASS | NEXT CLASS | FRAMES | NO FRAMES | ||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||