public class DynamicScalarImage extends java.lang.Object implements VoxelwiseStatisticalImage
Constructor and Description |
---|
DynamicScalarImage(int[] dataDims,
double[] voxelDims)
Construct an image, default interpolation is nearest neighbour.
|
Modifier and Type | Method and Description |
---|---|
void |
addValue(int i,
int j,
int k,
double v)
Adds a value to the voxel (i,j,k), with unit weight.
|
void |
addValue(int i,
int j,
int k,
double v,
double weight)
Add a value to the voxel (i,j,k), with custom weight.
|
void |
addValue(Point3D p,
double v)
Add a value to the voxel containing the point, with unit weight.
|
void |
addValue(Point3D p,
double v,
double weight)
Add a value to the voxel containing the point, with custom weight.
|
int[] |
getDataDims() |
double[] |
getVoxelDims() |
double[][][] |
getVoxelStatistic(java.lang.String stat)
Computes a 3D image, where each voxel intensity is some statistic of the data in each voxel.
|
public DynamicScalarImage(int[] dataDims, double[] voxelDims)
public void addValue(int i, int j, int k, double v)
addValue
in interface VoxelwiseStatisticalImage
public void addValue(int i, int j, int k, double v, double weight)
addValue
in interface VoxelwiseStatisticalImage
weight
- must be non-negative.public void addValue(Point3D p, double v)
addValue
in interface VoxelwiseStatisticalImage
public void addValue(Point3D p, double v, double weight)
addValue
in interface VoxelwiseStatisticalImage
weight
- must be non-negative.public double[][][] getVoxelStatistic(java.lang.String stat)
getVoxelStatistic
in interface VoxelwiseStatisticalImage
stat
- one of "mean", "max", "min". If no values have been added to a voxel, all of these
statistics are zero.public int[] getDataDims()
public double[] getVoxelDims()