public final class PointListROI extends java.lang.Object implements RegionOfInterest
Constructor and Description |
---|
PointListROI(Point3D[] pointList,
int[] dataDims,
double[] voxelDims)
Create an ROI from a list of points in mm coordinates.
|
PointListROI(Point3D[] pointList,
int xDataDim,
int yDataDim,
int zDataDim,
double xVoxelDim,
double yVoxelDim,
double zVoxelDim)
Create an ROI from a list of points in mm coordinates.
|
Modifier and Type | Method and Description |
---|---|
boolean |
containsMMPoint(Point3D point)
Tests to see if
point is within a voxel that contains one or more seed
points. |
boolean |
containsVoxel(int x,
int y,
int z)
Tests to see if a specific voxel is in this region.
|
RegionOfInterest |
getRegion(int index)
There is only one ROI in this class, so the index must be 0 and the
returned reference is
this . |
int[] |
getRegionLabels()
Get the list of unique region labels in this ROI, ordered from smallest to largest intensity.
|
Point3D[] |
getSeedPoints() |
Voxel[] |
getVoxels() |
int |
numberOfRegions() |
static PointListROI |
readPoints(java.lang.String file,
int[] dataDims,
double[] voxelDims)
Create an ROI from a list of points, in mm coordinates, stored as text in the format
x y z\nx y z\n... . |
public PointListROI(Point3D[] pointList, int xDataDim, int yDataDim, int zDataDim, double xVoxelDim, double yVoxelDim, double zVoxelDim)
public PointListROI(Point3D[] pointList, int[] dataDims, double[] voxelDims)
public static PointListROI readPoints(java.lang.String file, int[] dataDims, double[] voxelDims)
x y z\nx y z\n...
.public boolean containsVoxel(int x, int y, int z)
containsVoxel
in interface RegionOfInterest
x
- the x index of the voxely
- the y index of the voxelz
- the z index of the voxelpublic boolean containsMMPoint(Point3D point)
point
is within a voxel that contains one or more seed
points. Note that this does not test point
for equality with any of
the seed points in the ROI.containsMMPoint
in interface RegionOfInterest
point
- the point to testpublic Voxel[] getVoxels()
getVoxels
in interface RegionOfInterest
getSeedPoints()
, therefore there may be
duplicate voxels in the array.public Point3D[] getSeedPoints()
getSeedPoints
in interface RegionOfInterest
public int numberOfRegions()
numberOfRegions
in interface RegionOfInterest
public RegionOfInterest getRegion(int index)
this
.getRegion
in interface RegionOfInterest
index
- the index of the required region,
where -1 < index < numberOfRegions()
.public int[] getRegionLabels()
getRegionLabels
in interface RegionOfInterest