ICP Implementation of the Iterative Closest Point (ICP) algorithm.
  ------------------------------------------------------------------------------
  DESCRIPTION/NOTES
  With this function the alignment of two or more point clouds can be refined. A
  prerequisite for this is an approximate alignment of the point clouds.
  ------------------------------------------------------------------------------
  IMPORT PARAMETERS
 
  a ['InFiles', InFiles]
    Path to point clouds. Use '*' to select multiple files.
 
  b ['RedPoi', RedPoi]
    Coordinate reduction point defined as vector with 3 elements. A reduction
    point should be defined if the point clouds contain very large coordinates.
 
  ------------------------------------------------------------------------------
  EXPORT PARAMETERS
 
  a ['OutputFolder', OutputFolder]
    Path to directory in which output files are stored. If this option is
    omitted, the path given by the command 'cd' is used as directory.
 
  b ['OutputFormat', OutputFormat]
    Output format of transformed point clouds, e.g. 'ply', 'xyz', 'txt', 'las'.
 
  c ['TempFolder', TempFolder]
    Folder in which temporary files are saved, e.g. imported point clouds. If
    this option is omitted, the path given by the command 'tempdir' is used as
    directory.
 
  ------------------------------------------------------------------------------
  ICP PARAMETERS
  
  1 GENERAL ICP
    a ['MaxNoIt', MaxNoit]
      Maximum number of ICP iterations.
 
    b ['FixedPointClouds', FixedPointClouds]
      Filename(s) of fixed point cloud(s). It is possible to define multiple
      files.
 
    c ['NoOfTransfParam', NoOfTransfParam]
      Number of transformation parameters that are used in the ICP algorithm for
      the transformation of the loose point clouds. Possible choices are 1, 3, 
      6, 7 or 12:
      *  1 = only z translation parameter.
      *  3 = only 3 translation parameters (in x, y, and z).
      *  6 = rigid body transformation, i.e. 3 translation parameters plus
             3 rotational parameters.
      *  7 = similarity transformation, i.e. rigid body transformation plus an
             additional scale parameter.
      * 12 = affine transformation (9 parameters) and 3 translation
             parameters.
 
  2 DETERMINE POINT CLOUD OVERLAP
    a ['HullVoxelSize', HullVoxelSize]
      Voxel size of voxel hulls. The voxel hulls are used to determine the
      overlap between the point clouds. This parameter defines the voxel size
      (equal to edge length) of a single voxel.
 
      Side note: What is the voxel hull of a point cloud?
      The voxel hull is a low resolution representation of the volume occupied
      by a point cloud. For the computation of the voxel hull the object space
      is subdivided into a voxel structure. The voxel hull of the point cloud
      consists of all voxels which contain at least one point of the point
      cloud.
 
  3 SELECTION OF CORRESPONDENCES
    a ['UniformSamplingDistance', UniformSamplingDistance]
      Mean distance between corresponding points. The selection of
      correspondences is based on a uniform sampling strategy. For this a voxel
      structure is derived from the point clouds and those points which are
      closest to each voxel center are selected. This parameter defines the edge
      length of the voxels. This strategy leads to a homogeneus distribution of
      the selected points in object space.
        
  4 PLANE FITTING
    a ['PlaneSearchRadius', PlaneSearchRadius]
      Search radius for plane fitting. All points within the search radius are
      considered for the plane fitting. A good choice of the search radius is
      based on the point cloud density and the geometry of the scanned object.
      Note: to ensure a certain redundancy, planes are only considered if the
      search area contains at least 8 points.
 
  5 WEIGHTING
    a ['WeightByRoughness', WeightByRoughness]
      Logical value defining if correspondences are weighted on basis of the
      roughness of corresponding points.
 
    b ['WeightByDeltaAngle', WeightByDeltaAngle]
      Logical value defining if correspondences are weighted on basis of the
      angle between the normals of corresponding points.
 
  6 REJECTION OF CORRESPONDENCES
    a ['MaxDeltaAngle', MaxDeltaAngle]
      Maximum allowed angle (in degree) between normals of corresponding points.
 
    b ['MaxDistance', MaxDistance]
      Maximum allowed point to point distance between corresponding points.
 
    c ['MaxSigmaMad', MaxSigmaMad]
      This option is used to remove correspondence outliers. All correspondences
      with a point to plane distance (dp) outside the range
      [-MaxSigmaMad*SigmaMad(dp) +MaxSigmaMad*SigmaMad(dp)] are rejected.
      Note: SigmaMad is a robust estimator for the standard deviation of a data
            set under the assumption that the set has a Gaussian distribution:
            SigmaMad = 1.4812 * mad; where mad is the median of the absolute
            differences (with respect to the median) of the data set.
 
    d ['MaxRoughness', MaxRoughness]
      Maximum allowed roughness of extracted planes. As roughness measure the
      standard deviation of plane fitting is used.
  
  7 REPORT
    a ['LogLevel', LogLevel]
      Possible choices:
      * 'debug' -> all informations are displayed in workspace.
      * 'basic' -> only basic informations are displayed in workspace.
      * 'off'   -> no informations are displayed in workspace.
 
    b ['Plot', Plot]
      If true, the point clouds are visualized after each ICP iteration.
 
  8 ADVANCED PARAMETERS
    a ['SubsetRadius', subsetRadius]
      Radius for the selection of point cloud subsets. Background: for large
      point clouds, usually it is not possible to load all point clouds in
      memory simultaneously. Thus, only a small subset of points has to be
      selected for each point cloud. For this points are selected around the
      established correspondences within a specific radius, which is defined by
      this parameter.
 
  ------------------------------------------------------------------------------
  philipp.glira@gmail.com
  ------------------------------------------------------------------------------