use of mcib3d.geom.Object3D in project mcib3d-core by mcib3d.
the class TrackingAssociation method getResultsTableAssociation.
public ResultsTable getResultsTableAssociation() {
if (finalAssociations == null)
computeTracking();
// create results table
ResultsTable table = new ResultsTable();
// list associations
int row = table.getCounter();
for (AssociationPair pair : finalAssociations) {
int val1 = pair.getObject3D1().getValue();
int val2 = pair.getObject3D2().getValue();
double cost = pair.getAsso();
// table
table.setValue("Label1", row, val1);
table.setValue("Label2", row, val2);
table.setValue("Cost", row, cost);
row++;
}
// orphan1
row = table.getCounter();
for (Object3D object3D : finalOrphan1) {
table.setValue("Label1", row, object3D.getValue());
table.setValue("Label2", row, 0);
table.setValue("CostAsso", row, 0);
row++;
}
// orphan2
row = table.getCounter();
for (Object3D object3D : finalOrphan2) {
table.setValue("Label1", row, 0);
table.setValue("Label2", row, object3D.getValue());
table.setValue("CostAsso", row, 0);
row++;
}
return table;
}
use of mcib3d.geom.Object3D in project mcib3d-core by mcib3d.
the class Association method getOrphan1Population.
public Objects3DPopulation getOrphan1Population() {
Objects3DPopulation pop = new Objects3DPopulation();
for (String orphanS : getOrphan1()) {
int val = Integer.parseInt(orphanS);
Object3D object3D1 = population1.getObjectByValue(val);
pop.addObject(object3D1);
}
return pop;
}
use of mcib3d.geom.Object3D in project mcib3d-core by mcib3d.
the class Association method getAssociationTable.
@Deprecated
public ResultsTable getAssociationTable() {
ResultsTable rt = ResultsTable.getResultsTable();
if (rt == null)
rt = new ResultsTable();
// normal asso
int row = rt.getCounter();
for (String s : CostsOK.keySet()) {
Object3D object3D1 = getObject3D1fromAsso(s);
Object3D object3D2 = getObject3D2fromAsso(s);
rt.setValue("Label1", row, object3D1.getValue());
rt.setValue("Label2", row, object3D2.getValue());
rt.setValue("CostAsso", row, CostsOK.get(s));
row++;
}
// orphan1
row = rt.getCounter();
for (String s : getOrphan1()) {
rt.setValue("Label1", row, s);
rt.setValue("Label2", row, 0);
rt.setValue("CostAsso", row, 0);
row++;
}
// orphan2
row = rt.getCounter();
for (String s : getOrphan2()) {
rt.setValue("Label1", row, 0);
rt.setValue("Label2", row, s);
rt.setValue("CostAsso", row, 0);
row++;
}
return rt;
}
use of mcib3d.geom.Object3D in project mcib3d-core by mcib3d.
the class Association method drawOrphan2.
@Deprecated
public void drawOrphan2(ImageHandler draw) {
if (CostsAll == null)
computeAssociation();
// orphan2
for (String orphan : Orphan2) {
int val = Integer.parseInt(orphan);
Object3D object3D2 = population2.getObjectByValue(val);
object3D2.draw(draw);
}
}
use of mcib3d.geom.Object3D in project mcib3d-core by mcib3d.
the class Association method drawAssociationPath.
@Deprecated
public void drawAssociationPath(ImageHandler draw, ImageHandler path, ImageHandler track) {
if (CostsAll == null)
computeAssociation();
// normal association
for (String a : CostsOK.keySet()) {
int[] vals = Association.getValues(a);
int val1 = vals[0];
int val2 = vals[1];
Object3D object3D2 = population2.getObjectByValue(val2);
// get object in pop1 and value in path
Object3D object3D1 = population1.getObjectByValue(val1);
int pathValue = (int) path.getPixel(((Object3DVoxels) object3D1).getFirstVoxel());
object3D2.draw(draw, pathValue);
}
// orphan2
for (String orphan : Orphan2) {
int val = Integer.parseInt(orphan);
Object3D object3D2 = population2.getObjectByValue(val);
int pathValue = (int) track.getPixel(((Object3DVoxels) object3D2).getFirstVoxel());
object3D2.draw(draw, pathValue);
}
}
Aggregations