![]() | [using it] | Interface Manipulation Package v4.0 (2008-06-25) | ![]() | ©copyright | ![]() |
java.lang.Objectimp.ima.Volume
public class Volume
This class encapsulates a data-volume.
Nested Class Summary | |
---|---|
static class |
Volume.Filter
Defines an iterative filter on a volume. |
Constructor Summary | |
---|---|
Volume(double[] voxels,
int width,
int height,
int depth)
Constructs a volume of the given sizes. |
|
Volume(String file)
Constructs a volume from an inrimage file. |
Method Summary | |
---|---|
Volume |
diff(Volume volume)
Gets the difference of two volumes of the same size. |
double |
get(int x,
int y,
int z)
Gets a voxel value. |
int |
getDepth()
Gets image Z dimension. |
int |
getHeight()
Gets image Y dimension. |
String |
getName()
Gets image name. |
RgbImage |
getSlide(int n,
char slide,
double min,
double max)
Gets an image slide. |
Volume |
getSmooth(int size)
Gets an isotropic Gaussian smoothing the this volume. |
double[] |
getVoxels()
Gets image buffer. |
int |
getWidth()
Gets image X dimension. |
Volume |
save(String file)
Saves this volume in an inrimage file and return this. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Volume(double[] voxels, int width, int height, int depth)
voxels
- [optional, default is {.. 0, ..}] Volume voxels, such that Volume(i, j, k) = voxels[i + width * (j + height * k)]width
- Volume X dimension.height
- Volume Y dimension.depth
- Volume Z dimension.public Volume(String file) throws IOException
file
- An inrimage file which pixel TYPE is unsigned fixed, PIXSIZE is 16 bits and VDIM is 1.
Other inrimage format must be converted before being read, e.g. via inrcast -t ushort -val 0,32000 <input> -o <output>
IOException
Method Detail |
---|
public Volume diff(Volume volume)
public double get(int x, int y, int z)
public int getDepth()
public int getHeight()
public String getName()
public RgbImage getSlide(int n, char slide, double min, double max)
n
- Slide index.slide
- [optional, default is f] Slide orientation: [f]rontal (width x height), [s]aggital (depth x height), [h]orizontal (width x depth).min
- [optional, default is image-min-value] The image intensity corresponding to the 0 output value.max
- [optional, default is image-max-value] The image intensity corresponding to the 255 output value.
public Volume getSmooth(int size)
size
- Smoothing window size.public double[] getVoxels()
public int getWidth()
public Volume save(String file) throws IOException
file
- The inrimage file name.
IOException