| 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.Slice
|
+--ncsa.horizon.util.AdjustableSlice
This class provides methods for changing a slice's position, size, and sampling. Only the number of axes in the space in which this Slice 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 | |
| AdjustableSlice(int nax,
int xaxis,
int yaxis)
create a Slice object in which all the lengths of all sides have a length of one. |
|
| AdjustableSlice(int nax)
create a Slice object of unit size and nax dimensions; the first two axes are assumed to be the ones defining the slice plane. |
|
| AdjustableSlice(Voxel vox,
java.awt.Dimension dim,
int xaxis,
int yaxis)
create a Slice object located at a given Voxel and of given dimensions |
|
| AdjustableSlice(Volume vol,
int xaxis,
int yaxis)
create a Slice object from a Volume |
|
| AdjustableSlice(Volume vol)
create a Slice object from a Volume. |
|
| Method Summary | |
| int[] | getArea()
return a two element array giving the area enclosed by this slice |
| int[] | getAreaOrigin()
return a two element array giving the x and y positions of this slice |
| double[] | getExactArea()
return a two element array giving the area enclosed by this slice |
| double[] | getExactAreaOrigin()
return a two element array giving the x and y positions of this slice |
| double | getExactXaxisLength()
set the length of the Slice along the x axis |
| double | getExactXaxisOrigin()
set the position of the Slice along the x axis |
| double | getExactYaxisLength()
set the length of the Slice along the y axis |
| double | getExactYaxisOrigin()
set the position of the Slice along the y axis |
| java.util.Observable | getMonitor()
return an Observable monitor for listening for changes to this Slice. |
| int | getRoundedXaxisStride()
set the sampling of the Slice along the x axis |
| int | getRoundedYaxisStride()
set the sampling of the Slice along the y axis |
| int | getXaxisLength()
set the length of the Slice along the x axis |
| int | getXaxisOrigin()
set the position of the Slice along the x axis |
| double | getXaxisStride()
set the sampling of the Slice along the x axis |
| int | getYaxisLength()
set the length of the Slice along the y axis |
| int | getYaxisOrigin()
set the position of the Slice along the y axis |
| double | getYaxisStride()
set the sampling of the Slice along the y axis |
| boolean | isMutable()
return true if the position of this Voxel can change. |
| 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 |
| void | setXaxis(int i)
set the x axis to be the given integer, indicating that this axis can be have a length larger than one. |
| void | setXaxisLength(double pos)
set the position of the Slice along the x axis |
| void | setXaxisLength(int pos)
set the position of the Slice along the x axis |
| void | setXaxisOrigin(double pos)
set the position of the Slice along the x axis |
| void | setXaxisOrigin(int pos)
set the position of the Slice along the x axis |
| void | setXaxisStride(double pos)
set the position of the Slice along the x axis |
| void | setXaxisStride(int pos)
set the position of the Slice along the x axis |
| void | setYaxis(int i)
set the ordinate (y-) axis to be the given integer, indicating that this axis can be have a length larger than one. |
| void | setYaxisLength(double pos)
set the position of the Slice along the y axis |
| void | setYaxisLength(int pos)
set the position of the Slice along the y axis |
| void | setYaxisOrigin(double pos)
set the position of the Slice along the y axis |
| void | setYaxisOrigin(int pos)
set the position of the Slice along the y axis |
| void | setYaxisStride(double pos)
set the position of the Slice along the y axis |
| void | setYaxisStride(int pos)
set the position of the Slice along the y axis |
| 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 AdjustableSlice(int nax,
int xaxis,
int yaxis)
throws java.lang.ArrayIndexOutOfBoundsException
nax
- number of axes in the space in which it exists
xaxis
- axis to be considered the x axis (zero-relative).
yaxis
- axis to be considered the y axis (zero-relative).public AdjustableSlice(int nax)
public AdjustableSlice(Voxel vox,
java.awt.Dimension dim,
int xaxis,
int yaxis)
throws java.lang.ArrayIndexOutOfBoundsException
vox
- location of slice vertex closest to origin of space
dim
- dimension of slice in x and y directions
xaxis
- axis index of x-axis (zero-relative).
yaxis
- axis index of y-axis (zero-relative).
public AdjustableSlice(Volume vol,
int xaxis,
int yaxis)
throws java.lang.ArrayIndexOutOfBoundsException
vol
- volume to slice
xaxis
- axis index of x-axis (zero-relative).
yaxis
- axis index of y-axis (zero-relative).public AdjustableSlice(Volume vol)
vol
- the input volume| Method Detail |
public boolean isMutable()
public java.util.Observable getMonitor()
public void setXaxis(int i)
i
- index of axis (zero-relative)public void setYaxis(int i)
i
- index of axis (zero-relative)public void setXaxisOrigin(double pos)
public void setYaxisOrigin(double pos)
public void setXaxisOrigin(int pos)
public void setYaxisOrigin(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 setXaxisLength(double pos)
public void setYaxisLength(double pos)
public void setXaxisLength(int pos)
public void setYaxisLength(int pos)
public void setXaxisStride(double pos)
public void setYaxisStride(double pos)
public void setXaxisStride(int pos)
public void setYaxisStride(int pos)
public final double[] getExactArea()
public final int[] getArea()
public final int[] getAreaOrigin()
public final double[] getExactAreaOrigin()
public final int getXaxisOrigin()
public final double getExactXaxisOrigin()
public final int getYaxisOrigin()
public final double getExactYaxisOrigin()
public final int getXaxisLength()
public final double getExactXaxisLength()
public final int getYaxisLength()
public final double getExactYaxisLength()
public final int getRoundedXaxisStride()
public final double getXaxisStride()
public final int getRoundedYaxisStride()
public final double getYaxisStride()
| Overview | Package | Class | Tree | Deprecated | Index | Help | |||
| PREV CLASS | NEXT CLASS | FRAMES | NO FRAMES | ||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||