public class Objects3DPopulation
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.util.HashMap<java.lang.String,java.lang.Integer> |
hashName |
protected java.util.HashMap<java.lang.Integer,java.lang.Integer> |
hashValue |
protected KDTreeC |
kdtree |
Constructor and Description |
---|
Objects3DPopulation()
Conctructor
|
Objects3DPopulation(java.util.ArrayList<Object3D> objs) |
Objects3DPopulation(ImageHandler plus,
int threshold) |
Objects3DPopulation(ImageInt plus,
int threshold) |
Objects3DPopulation(ImagePlus plus)
Deprecated.
|
Objects3DPopulation(Object3D[] objs) |
Objects3DPopulation(Object3D[] objs,
Calibration cal)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
addImage(ImageHandler seg,
int threshold) |
void |
addImage(ImageInt seg,
Calibration cali)
Deprecated.
|
void |
addImage(ImageInt seg,
int threshold,
Calibration cali)
Deprecated.
|
void |
addImage(ImagePlus plus)
Deprecated.
|
void |
addImageWithOffset(ImageHandler seg,
int threshold) |
void |
addObject(Object3D obj)
Add an object to the population
|
void |
addObjects(java.util.ArrayList<Object3D> list) |
void |
addObjects(Object3D[] objs) |
void |
addPoints(Point3D[] points) |
Object3D |
closestBorder(double x,
double y,
double z) |
Object3D |
closestBorder(double x,
double y,
double z,
double dist) |
Object3D |
closestBorder(Object3D O)
Get the closest object in the population from given object Border to
border distance
|
Object3D |
closestBorder(Object3D ob,
java.util.ArrayList<Object3D> exclude) |
Object3D |
closestBorder(Object3D O,
double dist)
Get the closest object in the population from given object with distance
greater than given distance, distance border to border between objects
|
Object3D |
closestBorder(Object3D O,
int[] allowed) |
Object3D |
closestBorder(Object3D O,
int[] allowed,
double dist) |
Object3D |
closestCenter(double x,
double y,
double z) |
Object3D |
closestCenter(double x,
double y,
double z,
double dist) |
Object3D |
closestCenter(Object3D ob,
java.util.ArrayList<Object3D> exclude) |
Object3D |
closestCenter(Object3D obj,
boolean excludeInputObject)
Get the closest object in the population from given object Center to
center distance
|
Object3D |
closestCenter(Object3D O,
double dist)
Get the closest object in the population from given object with distance
greater than given distance
|
Object3D |
closestCenter(Object3D obj,
int[] allowed,
boolean excludeInputObject) |
Object3D |
closestCenter(Object3D O,
int[] allowed,
double dist) |
Object3D |
closestCenter(Point3D P) |
ArrayUtil |
computeDistances(Point3D[] evaluationPoints) |
void |
createKDTreeCenters() |
boolean |
createRandomPopulation(int nb,
double hardcore) |
void |
createRandomPopulationDistAbsMb(int nb,
double r0,
double r1) |
ArrayUtil |
distancesAllBorder() |
ArrayUtil |
distancesAllCenter() |
ArrayUtil |
distancesAllClosestBorder() |
ArrayUtil |
distancesAllClosestCenter() |
double[][] |
distancesAllPairsBorder()
All distances 2x2 from border to border
|
double[][] |
distancesAllPairsBorder(Objects3DPopulation pop)
All distances 2x2 from center to center
|
double[][] |
distancesAllPairsCenter()
All distances 2x2 from center to center
|
double[][] |
distancesAllPairsCenter(Objects3DPopulation pop)
All distances 2x2 from center to center
|
void |
draw(ImageStack ima) |
void |
draw(ImageStack ima,
int col) |
ImageInt |
drawPopulation() |
ImageInt |
drawPopulation(int sizex,
int sizey,
int sizez) |
ArrayUtil |
getAllIndices() |
Calibration |
getCalibration()
Deprecated.
|
int |
getIndexFromName(java.lang.String name) |
int |
getIndexFromValue(int val) |
int |
getIndexOf(Object3D ob) |
AbstractLog |
getLog() |
Object3D |
getMask() |
int[] |
getMaxSizeAllObjects() |
java.util.ArrayList<double[]> |
getMeasureCentroid() |
java.util.ArrayList<double[]> |
getMeasuresGeometrical() |
java.util.ArrayList<double[]> |
getMeasuresMesh()
Deprecated.
|
java.util.ArrayList<double[]> |
getMeasuresShape() |
java.util.ArrayList<double[]> |
getMeasuresStats(ImageHandler raw) |
java.util.ArrayList<double[]> |
getMeasuresStats(ImageStack raw) |
int |
getNbObjects() |
Object3D |
getObject(int i) |
Object3D |
getObjectByName(java.lang.String name) |
Object3D |
getObjectByValue(int val) |
int |
getObjectIndex(int value) |
Object3D[] |
getObjectsArray() |
java.util.ArrayList<Object3D> |
getObjectsList() |
java.util.ArrayList<Object3D> |
getObjectsWithinDistanceBorder(Object3D ob,
double dist) |
java.util.ArrayList<Object3D> |
getObjectsWithinDistanceCenter(Object3D ob,
double dist) |
java.util.ArrayList<Object3D> |
getObjectsWithinVolume(double volumeMin,
double volumeMax,
boolean useUnit) |
Point3D |
getRandomPointInMask() |
double |
getScaleXY() |
double |
getScaleZ() |
java.lang.String |
getUnit() |
double[][] |
histogramDistancesBorder(double step)
Histogram of all distances border to border
|
double[][] |
histogramDistancesCenter(double step)
Histogram of all distances center to center
|
Object3D |
kClosestCenter(Object3D ob,
int k,
java.util.ArrayList<Object3D> exclude) |
Object3D |
kClosestCenter(Object3D ob,
int k,
boolean excludeInputObject) |
Object3D[] |
kClosestCentres(double x,
double y,
double z,
int k) |
double[] |
kClosestDistancesSquared(double x,
double y,
double z,
int k) |
void |
loadObjects(java.lang.String path) |
void |
removeObject(int i) |
void |
removeObject(Object3D obj) |
void |
removeObjectsTouchingBorders(ImageHandler img,
boolean Z) |
void |
removeObjectsTouchingBorders(ImagePlus img,
boolean Z) |
boolean |
saveObjects(java.lang.String path) |
boolean |
saveObjects(java.lang.String path,
int[] indexes) |
Object3D |
secondClosestCenter(Object3D ob,
java.util.ArrayList<Object3D> exclude) |
Object3D |
secondClosestCenter(Object3D O,
boolean ExcludeInputObject)
Get the second closest object in the population from given object with
distance greater than given distance
|
Object3D |
secondClosestCenter(Object3D O,
double dist)
Get the second closest object in the population from given object with
distance greater than given distance
|
void |
setCalibration(Calibration cal)
Deprecated.
|
void |
setCalibration(double sxy,
double sz,
java.lang.String u) |
void |
setLog(AbstractLog log) |
void |
setMask(Object3D mask) |
void |
setObject(int i,
Object3D obj) |
void |
setScale(double sxy,
double sz,
java.lang.String u) |
void |
setScaleXY(double scaleXY) |
void |
setScaleZ(double scaleZ) |
void |
setUnit(java.lang.String unit) |
java.util.ArrayList<Object3D> |
shuffle() |
void |
sortPopulation() |
void |
updateNamesAndValues() |
protected KDTreeC kdtree
protected java.util.HashMap<java.lang.Integer,java.lang.Integer> hashValue
protected java.util.HashMap<java.lang.String,java.lang.Integer> hashName
public Objects3DPopulation()
public Objects3DPopulation(Object3D[] objs)
public Objects3DPopulation(java.util.ArrayList<Object3D> objs)
@Deprecated public Objects3DPopulation(Object3D[] objs, Calibration cal)
@Deprecated public Objects3DPopulation(ImagePlus plus)
public Objects3DPopulation(ImageHandler plus, int threshold)
public Objects3DPopulation(ImageInt plus, int threshold)
public AbstractLog getLog()
public void setLog(AbstractLog log)
public double getScaleXY()
public void setScaleXY(double scaleXY)
public double getScaleZ()
public void setScaleZ(double scaleZ)
public java.lang.String getUnit()
public void setUnit(java.lang.String unit)
@Deprecated public Calibration getCalibration()
@Deprecated public void setCalibration(Calibration cal)
cal
- public void setCalibration(double sxy, double sz, java.lang.String u)
public void setScale(double sxy, double sz, java.lang.String u)
public boolean createRandomPopulation(int nb, double hardcore)
nb
- hardcore
- public void createRandomPopulationDistAbsMb(int nb, double r0, double r1)
nb
- r0
- r1
- public void createKDTreeCenters()
public void draw(ImageStack ima, int col)
ima
- col
- public void draw(ImageStack ima)
public void addObject(Object3D obj)
obj
- the 3D object to addpublic final void addObjects(Object3D[] objs)
public void addObjects(java.util.ArrayList<Object3D> list)
public void removeObjectsTouchingBorders(ImageHandler img, boolean Z)
public void removeObjectsTouchingBorders(ImagePlus img, boolean Z)
public void removeObject(int i)
public void removeObject(Object3D obj)
public void updateNamesAndValues()
public void addPoints(Point3D[] points)
@Deprecated public void addImage(ImageInt seg, int threshold, Calibration cali)
seg
- threshold
- cali
- public void addImage(ImageHandler seg, int threshold)
public void addImageWithOffset(ImageHandler seg, int threshold)
@Deprecated public void addImage(ImageInt seg, Calibration cali)
@Deprecated public void addImage(ImagePlus plus)
plus
- public Object3D getMask()
public void setMask(Object3D mask)
mask
- public Object3D getObject(int i)
i
- public void setObject(int i, Object3D obj)
public Object3D getObjectByValue(int val)
public int getObjectIndex(int value)
public Object3D getObjectByName(java.lang.String name)
public int getIndexFromName(java.lang.String name)
public int getIndexFromValue(int val)
public int getIndexOf(Object3D ob)
public ArrayUtil getAllIndices()
public Object3D[] getObjectsArray()
public java.util.ArrayList<Object3D> getObjectsList()
public int getNbObjects()
public int[] getMaxSizeAllObjects()
public ImageInt drawPopulation()
public ImageInt drawPopulation(int sizex, int sizey, int sizez)
public Point3D getRandomPointInMask()
public ArrayUtil computeDistances(Point3D[] evaluationPoints)
evaluationPoints
- public double[][] distancesAllPairsCenter()
public double[][] distancesAllPairsCenter(Objects3DPopulation pop)
pop
- other population of objectspublic double[][] distancesAllPairsBorder(Objects3DPopulation pop)
pop
- other population of objectspublic ArrayUtil distancesAllCenter()
public ArrayUtil distancesAllBorder()
public ArrayUtil distancesAllClosestCenter()
public ArrayUtil distancesAllClosestBorder()
public java.util.ArrayList<double[]> getMeasuresGeometrical()
public java.util.ArrayList<double[]> getMeasuresStats(ImageHandler raw)
public java.util.ArrayList<double[]> getMeasuresStats(ImageStack raw)
public double[][] distancesAllPairsBorder()
public double[][] histogramDistancesCenter(double step)
step
- to create bins from min to maxpublic double[][] histogramDistancesBorder(double step)
step
- to create bins from min to maxpublic Object3D closestCenter(double x, double y, double z, double dist)
x
- y
- z
- dist
- public Object3D closestBorder(double x, double y, double z, double dist)
public Object3D closestCenter(Object3D ob, java.util.ArrayList<Object3D> exclude)
public Object3D closestCenter(double x, double y, double z)
x
- x coordinate in pixely
- y coordinate in pixelz
- z coordinate in pixelpublic Object3D closestCenter(Object3D O, double dist)
O
- dist
- public Object3D closestBorder(Object3D O, double dist)
O
- dist
- public Object3D closestCenter(Object3D obj, boolean excludeInputObject)
obj
- public Object3D closestCenter(Object3D obj, int[] allowed, boolean excludeInputObject)
public Object3D closestBorder(Object3D O)
O
- public Object3D[] kClosestCentres(double x, double y, double z, int k)
public double[] kClosestDistancesSquared(double x, double y, double z, int k)
public Object3D kClosestCenter(Object3D ob, int k, java.util.ArrayList<Object3D> exclude)
public java.util.ArrayList<Object3D> getObjectsWithinDistanceCenter(Object3D ob, double dist)
public java.util.ArrayList<Object3D> getObjectsWithinDistanceBorder(Object3D ob, double dist)
public java.util.ArrayList<Object3D> getObjectsWithinVolume(double volumeMin, double volumeMax, boolean useUnit)
public Object3D secondClosestCenter(Object3D O, double dist)
O
- dist
- public Object3D secondClosestCenter(Object3D O, boolean ExcludeInputObject)
O
- public Object3D secondClosestCenter(Object3D ob, java.util.ArrayList<Object3D> exclude)
public Object3D closestBorder(double x, double y, double z)
x
- y
- z
- public java.util.ArrayList<Object3D> shuffle()
public java.util.ArrayList<double[]> getMeasureCentroid()
public java.util.ArrayList<double[]> getMeasuresShape()
@Deprecated public java.util.ArrayList<double[]> getMeasuresMesh()
public boolean saveObjects(java.lang.String path)
public boolean saveObjects(java.lang.String path, int[] indexes)
public void sortPopulation()
public void loadObjects(java.lang.String path)