Constructor and Description |
---|
Grid3D(Grid3D input) |
Grid3D(int width,
int height,
int depth)
Constructor that directly allocates the Memory
|
Grid3D(int width,
int height,
int depth,
boolean allocateImmediately)
Constructor does not allocate the Memory but saves the size
|
Modifier and Type | Method and Description |
---|---|
void |
addAtIndex(int i,
int j,
int k,
float val) |
void |
addSlice(Grid2D slice) |
void |
allocate()
Allocate the memory for all slices
|
Grid |
clone()
Deep copy the object
|
float |
getAtIndex(int i,
int j,
int k) |
java.util.ArrayList<Grid2D> |
getBuffer() |
Grid2D |
getSubGrid(int i) |
float |
getValue(int[] idx) |
double[] |
indexToPhysical(double i,
double j,
double k) |
void |
multiplyAtIndex(int i,
int j,
int k,
float val) |
double[] |
physicalToIndex(double x,
double y,
double z) |
void |
removeSlice(int idx) |
void |
setAtIndex(int i,
int j,
int k,
float val) |
void |
setOrigin(double... origin)
Set the array origin's world coordinates, given in real world units (usually mm) of the first pixel's center (excluding borders), in all dimensions.
|
void |
setSpacing(double... spacing)
Set the array's spacings.
|
Grid2D |
setSubGrid(int i,
Grid2D grid) |
void |
show()
Show the object in an imageJ window
|
void |
show(java.lang.String title)
Show the object in an imageJ window with title
|
java.lang.String |
toString()
Serialize the grid's content to a String.
|
getNumberOfElements, getOrigin, getSize, getSpacing
public Grid3D(int width, int height, int depth)
width
- height
- depth
- public Grid3D(int width, int height, int depth, boolean allocateImmediately)
width
- height
- depth
- allocateImmediately
- Boolean flag for memory allocationpublic Grid3D(Grid3D input)
public void allocate()
public void addSlice(Grid2D slice)
public void removeSlice(int idx)
public java.util.ArrayList<Grid2D> getBuffer()
public Grid2D getSubGrid(int i)
public double[] indexToPhysical(double i, double j, double k)
public double[] physicalToIndex(double x, double y, double z)
public float getAtIndex(int i, int j, int k)
public void setAtIndex(int i, int j, int k, float val)
public void addAtIndex(int i, int j, int k, float val)
public void multiplyAtIndex(int i, int j, int k, float val)
public java.lang.String toString()
Grid
public void show(java.lang.String title)
Grid
public void show()
Grid
public void setSpacing(double... spacing)
Grid
setSpacing
in class Grid