|
BIJ API |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--volume.Volume | +--volume.VolumeRGB
This class implements RGB vector volumes. Copyright (c) 1999-2002, Michael Abramoff. All rights reserved.
Field Summary | |
byte[] |
b
The brightness of each voxel as a byte (0-225). |
byte[] |
index
The index value for each voxel, if any. |
java.lang.Object[] |
sliceArray
The slices for this volume with the actual RGB data. |
Fields inherited from class volume.Volume |
aspectx, aspecty, aspectz, depth, edge, height, width |
Constructor Summary | |
VolumeRGB(int width,
int height,
int depth,
double aspectx,
double aspecty,
double aspectz)
Creates an RGB volume of defined size and aspect ratio. |
|
VolumeRGB(java.lang.Object[] sliceArray,
int width,
int depth,
double aspectx,
double aspecty,
double aspectz)
Creates an RGB volume of defined aspect ratio from an array of slices. |
Method Summary | |
static int |
ColorToInt(java.awt.Color color)
Utility routine to convert a java Color to an ARGB int. |
java.lang.Object |
get(int x,
int y,
int z)
Get the brightness of the voxel at x,y,z as an integer between 0-255. |
ij.ImageStack |
getImageStack()
Make an ImageJ imagestack from the brightness info. |
static float[] |
intToHSB(float[] hsb,
int i)
Utility routine to convert an ARGB int format to float [] HSB format. |
boolean |
isIndexed()
|
protected void |
load(java.lang.Object[] sliceArray,
int start)
Fill the brightness volume b with the int[] slices, starting at slice start. |
void |
set(java.lang.Object value,
int x,
int y,
int z)
Set the brightness of the voxel at x,y,z as an integer between 0-255. |
void |
setIndex(java.lang.Object[] sliceArray)
Combine the values of s into the index array of this volume. |
Methods inherited from class volume.Volume |
discreteSupport, getAspectx, getAspecty, getAspectz, getDepth, getEdge, getHeight, getWidth, in, setAspects, setEdge, toString, valid, valid |
Methods inherited from class java.lang.Object |
|
Field Detail |
public byte[] b
public byte[] index
public java.lang.Object[] sliceArray
Constructor Detail |
public VolumeRGB(int width, int height, int depth, double aspectx, double aspecty, double aspectz)
width
- height
- depth
- the dimensions of the volumeaspectx
- aspecty
- aspectz
- the aspect ratios of the volume dimensions.public VolumeRGB(java.lang.Object[] sliceArray, int width, int depth, double aspectx, double aspecty, double aspectz)
sliceArray
- an array of Objects, which are int [] with each RGB voxel.aspectx
- aspecty
- aspectz
- the aspect ratios of the volume dimensions.Method Detail |
public java.lang.Object get(int x, int y, int z)
get
in class Volume
x
- the x position of the voxely
- the y position of the voxelz
- the z position of the voxelpublic void set(java.lang.Object value, int x, int y, int z)
set
in class Volume
value
- a Number with the brightness between 0 (0.0) and 255 (1.0)x
- the x position of the voxely
- the y position of the voxelz
- the z position of the voxelprotected void load(java.lang.Object[] sliceArray, int start)
sliceArray
- an array of Objects, which are byte [] with the index value for
each voxel.start
- the first slice to be loaded (starting with slice 1).public ij.ImageStack getImageStack()
public static float[] intToHSB(float[] hsb, int i)
hsb
- a float[3] (at least) that will contain the HSB values on exiti
- a color in int ARGB format.public static int ColorToInt(java.awt.Color color)
color
- a Color.public void setIndex(java.lang.Object[] sliceArray)
sliceArray
- an array of Objects, which are byte [] with the index value for
each voxel.public boolean isIndexed()
|
BIJ API |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |