|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--Reasoner.ObjectInference
Serves as a wrapper for the details of a single object inferred by the Reasoner and necessary for the Renderer to depict its interpretation. For each run of the Monte Carlo simulation, a slightly different set of inferences will be made. Each set is designed to be stored in its own MonteCarloRunSet for later distillation.
MonteCarloRunSet,
Attitude,
Dimensions,
Position,
RegionSet| Nested Class Summary | |
class |
ObjectInference.ObjectInferenceRegionPairing
Defines a pairing of an object inference with a region name. |
class |
ObjectInference.VarianceWrapper
Defines a wrapper of position, dimensions, and attitudes for the distiller to record the variance from the mean of a population of object inferences. |
| Field Summary | |
static java.lang.String |
FIELD_PIPPER
|
protected java.util.HashMap |
m_active_regions
|
private Attitude |
m_attitude
|
private int |
m_cluster_id
|
private Dimensions |
m_dimensions
|
private boolean |
m_is_attitude_propagated
|
private boolean |
m_is_position_propagated
|
private MonteCarloRunSet |
m_monte_carlo_run_set
|
private java.lang.String |
m_object_name
|
private ObjectTemplate |
m_object_template
|
private Position |
m_position
|
private RegionSet |
m_region_set
|
private float |
m_transparency
|
private ObjectInference.VarianceWrapper |
m_variance
|
static int |
NO_CLUSTER_ID
|
static java.lang.String |
OBJECT_WORLD_CENTER
|
private float |
PIPPER_RANGE
|
| Constructor Summary | |
ObjectInference(ObjectTemplate object_template,
Position position,
Dimensions dimensions,
Attitude attitude,
RegionSet region_set)
Creates a new inference for a single object produced by the Reasoner. |
|
| Method Summary | |
boolean |
doRegionsOverlap(java.lang.String region1_name,
ObjectInference object_inference2,
java.lang.String region2_name)
Returns whether a region in this object inference overlaps a region of another object inference. |
Attitude |
getAttitude()
Returns the attitude component of this inference. |
ObjectInference |
getClone()
Returns a deep copy of this object except for its RegionSet and regions-in-use list, which are not designed to be changed in later processing stages. |
int |
getClusterID()
Returns the cluster ID of this inference. |
Dimensions |
getDimensions()
Returns the dimensions component of this inference. |
Position |
getInverseRandomPositionInRegion(java.lang.String region_name,
ObjectInference target_object_inference)
Returns a random position of an object inference that could have been used to position this object inference. |
java.lang.String |
getModelName()
Returns the name of the model associated with this inference. |
MonteCarloRunSet |
getMonteCarloRunSet()
Gets the Monte Carlo run set this object inference resides in. |
java.lang.String |
getObjectName()
Returns the name of the object associated with this inference. |
ObjectTemplate |
getObjectTemplate()
Returns the object template associated with this inference. |
Position |
getPipperPosition()
Returns the position of the pipper, which is a virtual sight positioned at azimuth 0 and a fixed range. |
Position |
getPosition()
Returns the position component of this inference. |
Attitude |
getRandomAttitudeInRegion(java.lang.String region_name)
Returns a random attitude that would face this object inference within a region by placing its pipper there. |
Position |
getRandomPositionInIntersectedRegions(java.util.ArrayList object_inference_pairings,
int max_attempts)
/* Returns a position that satisfies the intersection of a set of regions. |
Position |
getRandomPositionInIntersectedRegions(java.lang.String[] region_names)
Returns a random position contained within the intersection of multiple geometries of a region and generated based on their topologies. |
Position |
getRandomPositionInRegion(java.lang.String region_name)
Returns a random position contained within the geometry of a region and generated based on its topology. |
RegionSet |
getRegionSet()
Return all the regions associated with this inference, even those not in use. |
java.util.Collection |
getRegionsInUse()
Return only the regions associated with this inference that are in use. |
float |
getTransparency()
Returns the transparency value to be used in rendering this inference. |
ObjectInference.VarianceWrapper |
getVariance()
Gets the variance of the position, dimensions, and attitude of this object inference. |
boolean |
isAttitudePropagated()
Returns whether the attitude of this object inference has been propagated. |
void |
isAttitudePropagated(boolean state)
Sets whether the attitude of this object inference has been propagated. |
boolean |
isPipperInRegion(java.lang.String region_name)
Returns whether the pipper of this object inference is contained within the geometry of a region. |
boolean |
isPositionInRegion(Position position,
java.lang.String region_name)
Returns whether a position is contained within the geometry of a region. |
boolean |
isPositionPropagated()
Returns whether the position of this object inference has been propagated. |
void |
isPositionPropagated(boolean state)
Sets whether the position of this object inference has been propagated. |
boolean |
isSpatiallyEquivalent(ObjectInference object_inference,
float tolerance)
Returns whether two object inferences are close enough in position, dimensions, and attitude to be considered reasonably equivalent for interpretation purposes. |
void |
recodeObjectName(java.lang.String object_name)
Changes the name of the object associated with this inference. |
void |
registerRegionInUse(Region region)
Records that a region is in use so it can be rendered as a metaoverlay. |
void |
setClusterID(int cluster_id)
Sets the cluster ID of this inference, which is used to relate object inferences across multiple Monte Carlo run sets. |
void |
setMonteCarloRunSet(MonteCarloRunSet monte_carlo_run_set)
Sets the Monte Carlo run set this object inference resides in. |
void |
setTransparency(float transparency)
Sets the transparency value to be used in rendering this inference. |
void |
setVariance(Position position_variance,
Dimensions dimensions_variance,
Attitude attitude_variance)
Sets the variance of the position, dimensions, and attitude of this object inference. |
java.lang.String |
toHTMLString()
Returns an indented HTML string representation of this object to be displayed by the Representation Viewer. |
java.lang.String |
toString()
Returns a string representation of this object. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
private java.lang.String m_object_name
private Position m_position
private Dimensions m_dimensions
private Attitude m_attitude
private ObjectInference.VarianceWrapper m_variance
private ObjectTemplate m_object_template
private float m_transparency
private RegionSet m_region_set
protected java.util.HashMap m_active_regions
private boolean m_is_position_propagated
private boolean m_is_attitude_propagated
private MonteCarloRunSet m_monte_carlo_run_set
private final float PIPPER_RANGE
public static final int NO_CLUSTER_ID
private int m_cluster_id
public static final java.lang.String OBJECT_WORLD_CENTER
public static final java.lang.String FIELD_PIPPER
| Constructor Detail |
public ObjectInference(ObjectTemplate object_template,
Position position,
Dimensions dimensions,
Attitude attitude,
RegionSet region_set)
object_template - - the object template this object inference is based onposition - - the particular position of the object in this interpretationdimensions - - the particular dimensions of the object in this interpretationattitude - - the particular attitude of the object in this interpretationregion_set - - the optional set of regions to associate with this object; otherwise null
Note that object_name within object_template must be held the same across all MonteCarloRunSets.
| Method Detail |
public boolean doRegionsOverlap(java.lang.String region1_name,
ObjectInference object_inference2,
java.lang.String region2_name)
throws java.lang.Exception
region1_name - - the name of the region associated with this object inferenceobject_inference2 - - the object inference containing the second regionregion2_name - - the name of the region associated with object_inference2
java.lang.Exception - - if either region is not associated with its object inferencepublic Attitude getAttitude()
public ObjectInference getClone()
public int getClusterID()
setClusterID(int)public Dimensions getDimensions()
public Position getInverseRandomPositionInRegion(java.lang.String region_name,
ObjectInference target_object_inference)
throws java.lang.Exception
region_name - - the region containing the inverse object inference
java.lang.Exception - - if the region is not associated with this inferencegetRandomPositionInRegion(java.lang.String)public java.lang.String getModelName()
public MonteCarloRunSet getMonteCarloRunSet()
setMonteCarloRunSet(Reasoner.MonteCarloRunSet)public java.lang.String getObjectName()
public ObjectTemplate getObjectTemplate()
public Position getPipperPosition()
getRandomAttitudeInRegion(java.lang.String)public Position getPosition()
public Attitude getRandomAttitudeInRegion(java.lang.String region_name)
throws java.lang.Exception
region_name - - the region name
java.lang.Exception - - if the region is not associated with this inferencegetPipperPosition()
public Position getRandomPositionInRegion(java.lang.String region_name)
throws java.lang.Exception
region_name - - the region
java.lang.Exception - - if the region is not associated with this inferencegetInverseRandomPositionInRegion(java.lang.String, Reasoner.ObjectInference)
public Position getRandomPositionInIntersectedRegions(java.lang.String[] region_names)
throws java.lang.Exception
region_names - - the regions
java.lang.Exception - - if any region is not associated with this inference
public Position getRandomPositionInIntersectedRegions(java.util.ArrayList object_inference_pairings,
int max_attempts)
throws java.lang.Exception
Oddly enough, none of the object inferences in the pairing need to associated in any way with this one. In fact, this could be defined as a static function.
object_inference_pairings - - the object inferences and regions to intersectmax_attempts - - the maximum number of attempts to satisfy the intersection
java.lang.Exception - - if generation failspublic RegionSet getRegionSet()
getRegionsInUse()public java.util.Collection getRegionsInUse()
getRegionSet()public float getTransparency()
public ObjectInference.VarianceWrapper getVariance()
setVariance(Renderer.Position, Renderer.Dimensions, Renderer.Attitude),
Distillerpublic boolean isAttitudePropagated()
public void isAttitudePropagated(boolean state)
state - - the state
public boolean isPositionInRegion(Position position,
java.lang.String region_name)
throws java.lang.Exception
position - - the positionregion_name - - the region
java.lang.Exception - - if the region is not associated with this inferencepublic boolean isPositionPropagated()
public void isPositionPropagated(boolean state)
state - - the state
public boolean isPipperInRegion(java.lang.String region_name)
throws java.lang.Exception
region_name - - the region
java.lang.Exception - - if the region is not associated with this inference
public boolean isSpatiallyEquivalent(ObjectInference object_inference,
float tolerance)
object_inference - - the inference to comparetolerance - - the tolerance
public void recodeObjectName(java.lang.String object_name)
This is for internal use by the Distiller only.
object_name - - the new object namepublic void registerRegionInUse(Region region)
region - - the regionpublic void setClusterID(int cluster_id)
cluster_id - - the cluster IDgetClusterID()public void setMonteCarloRunSet(MonteCarloRunSet monte_carlo_run_set)
monte_carlo_run_set - - the run setgetMonteCarloRunSet()public void setTransparency(float transparency)
transparency - - the transparency
public void setVariance(Position position_variance,
Dimensions dimensions_variance,
Attitude attitude_variance)
position_variance - - the position variancedimensions_variance - - the dimensions varianceattitude_variance - - the attitude variancegetVariance(),
Distillerpublic java.lang.String toHTMLString()
RepresentationViewerpublic java.lang.String toString()
toString in class java.lang.ObjectSupport.toPrettyString(java.lang.String)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||