public final class FreeFormROI extends java.lang.Object implements RegionOfInterest
Constructor and Description |
---|
FreeFormROI(short[][][] roi,
double[] voxelDims)
Create an ROI from an integer volume.
|
FreeFormROI(short[][][] roi,
double xVoxDim,
double yVoxDim,
double zVoxDim)
Create an ROI from an integer volume.
|
FreeFormROI(short[][][] roi,
short index,
double[] voxelDims)
Create an ROI from an integer volume.
|
FreeFormROI(short[][][] roi,
short index,
double xVoxDim,
double yVoxDim,
double zVoxDim)
Create an ROI from an integer volume.
|
Modifier and Type | Method and Description |
---|---|
boolean |
containsMMPoint(Point3D point)
Tests to see if a point measured in MM coordinates is in this region.
|
boolean |
containsVoxel(int x,
int y,
int z)
Tests to see if a specific voxel is in this region.
|
RegionOfInterest |
getRegion(int index)
Get a specific ROI.
|
int[] |
getRegionLabels()
Get the list of unique region labels in this ROI, ordered from smallest to largest intensity.
|
static FreeFormROI[] |
getRegions(short[][][] roi,
double xVoxDim,
double yVoxDim,
double zVoxDim)
Get all regions in the volume with a nonzero index.
|
Point3D[] |
getSeedPoints() |
Voxel[] |
getVoxels() |
int |
numberOfRegions() |
public FreeFormROI(short[][][] roi, double[] voxelDims)
voxelDims
- voxel dimensions, in mm.public FreeFormROI(short[][][] roi, double xVoxDim, double yVoxDim, double zVoxDim)
public FreeFormROI(short[][][] roi, short index, double[] voxelDims)
public FreeFormROI(short[][][] roi, short index, double xVoxDim, double yVoxDim, double zVoxDim)
public static FreeFormROI[] getRegions(short[][][] roi, double xVoxDim, double yVoxDim, double zVoxDim)
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)
containsMMPoint
in interface RegionOfInterest
point
- the point to testpublic Voxel[] getVoxels()
getVoxels
in interface RegionOfInterest
public Point3D[] getSeedPoints()
getSeedPoints
in interface RegionOfInterest
public int numberOfRegions()
numberOfRegions
in interface RegionOfInterest
public int[] getRegionLabels()
getRegionLabels
in interface RegionOfInterest
public RegionOfInterest getRegion(int index)
getRegion
in interface RegionOfInterest
index
- the index of the required region,
where -1 < index < numberOfRegions()
.