Package cz.fidentis.analyst.engines.icp
Record Class IcpConfig
java.lang.Object
java.lang.Record
cz.fidentis.analyst.engines.icp.IcpConfig
- Record Components:
kdTree
- The k-d tree of the primary mesh. Must not benull
. Inspected facets are transformed toward this primary mesh.maxIteration
- Maximal number of ICP iterations (it includes computing new transformation and applying it). A number bigger than zero. Reasonable number seems to be 10.scale
- Iftrue
, then the scale factor is also computed.error
- Acceptable error - a number bigger than or equal to zero. Mean distance of vertices is computed for each ICP iteration. If the difference between the previous and current mean distances is less than the error, then the ICP computation stops. Reasonable number seems to be 0.05.strategy
- One of the reduction strategies. Ifnull
, then no sub-sampling is used.crop
- The iteration number from which partially overlapped parts of surfaces are omitted from distance minimization (i.e. the faces are auto-cropped for the ICP step). Set the parameter to zero to turn the auto-cropping feature on for all ICP iterations. Set the parameter to any negative number to disable the auto-cropping feature. In general, use auto-cropping if the faces are pre-aligned. If unsure, use value 1.
public record IcpConfig(KdTree kdTree, int maxIteration, boolean scale, double error, PointSamplingConfig strategy, int crop)
extends Record
ICP strategies and their configuration.
-
Constructor Summary
ConstructorsConstructorDescriptionIcpConfig
(KdTree kdTree, int maxIteration, boolean scale, double error, PointSamplingConfig strategy, int crop) Creates an instance of aIcpConfig
record class.IcpConfig
(MeshModel meshModel, int maxIteration, boolean scale, double error, PointSamplingConfig strategy, int crop) Constructor that constructs k-D tree of th mesh model automatically.IcpConfig
(Collection<MeshFacet> meshFacets, int maxIteration, boolean scale, double error, PointSamplingConfig strategy, int crop) Constructor that constructs k-D tree of th mesh model automatically. -
Method Summary
Modifier and TypeMethodDescriptionint
crop()
Returns the value of thecrop
record component.final boolean
Indicates whether some other object is "equal to" this one.double
error()
Returns the value of theerror
record component.Instantiates and returns a point sampling visitor.final int
hashCode()
Returns a hash code value for this object.kdTree()
Returns the value of thekdTree
record component.int
Returns the value of themaxIteration
record component.boolean
scale()
Returns the value of thescale
record component.strategy()
Returns the value of thestrategy
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
IcpConfig
public IcpConfig(MeshModel meshModel, int maxIteration, boolean scale, double error, PointSamplingConfig strategy, int crop) Constructor that constructs k-D tree of th mesh model automatically.- Parameters:
meshModel
- Mesh model towards which other meshes will be registeredmaxIteration
- Max iterationsscale
- Whether to scaleerror
- Error factorstrategy
- ICP strategycrop
- Whether to crop
-
IcpConfig
public IcpConfig(Collection<MeshFacet> meshFacets, int maxIteration, boolean scale, double error, PointSamplingConfig strategy, int crop) Constructor that constructs k-D tree of th mesh model automatically.- Parameters:
meshFacets
- Mesh facets towards which other meshes will be registeredmaxIteration
- Max iterationsscale
- Whether to scaleerror
- Error factorstrategy
- ICP strategycrop
- Whether to crop
-
IcpConfig
public IcpConfig(KdTree kdTree, int maxIteration, boolean scale, double error, PointSamplingConfig strategy, int crop) Creates an instance of aIcpConfig
record class.- Parameters:
kdTree
- the value for thekdTree
record componentmaxIteration
- the value for themaxIteration
record componentscale
- the value for thescale
record componenterror
- the value for theerror
record componentstrategy
- the value for thestrategy
record componentcrop
- the value for thecrop
record component
-
-
Method Details
-
getVisitor
Instantiates and returns a point sampling visitor.- Returns:
- a point sampling visitor
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
kdTree
Returns the value of thekdTree
record component.- Returns:
- the value of the
kdTree
record component
-
maxIteration
public int maxIteration()Returns the value of themaxIteration
record component.- Returns:
- the value of the
maxIteration
record component
-
scale
public boolean scale()Returns the value of thescale
record component.- Returns:
- the value of the
scale
record component
-
error
public double error()Returns the value of theerror
record component.- Returns:
- the value of the
error
record component
-
strategy
Returns the value of thestrategy
record component.- Returns:
- the value of the
strategy
record component
-
crop
public int crop()Returns the value of thecrop
record component.- Returns:
- the value of the
crop
record component
-