CSOResample¶
- MLModule¶
 genre
author
package
dll
definition
keywords
resample,upsample,downsample,interpolate,seed,point,distance,equidistant
Purpose¶
Resamples seed points of a CSO to have a given distance.
Usage¶
Connect a CSOList, set the seed point distance and press Update. This is a CSOModificator, so you can choose to work on the input CSOList or to create a new list at the output.
Details¶
The seed points are sampled from the underlying polygon (formed by the path points) of a CSO with the given distance. Thus, both upsampling and downsampling are possible. Then, path points are created using linear interpolation.
The first seed point is kept. Closed CSOs remain closed. For open CSOs, the last seed point is kept. In both cases, the distance between the last two seed points may be smaller than the given distance or, if Allow smaller distance between last two points is false, the next to last seed point is skipped.
Sometimes it is desired to keep a certain number of seed points, e.g. 3 to make sure the CSO is planar. To achieve that, Minimum Number of Seed Points and Use minimum number of seed points can be used, which will decrease the distance to CSOLength/minNumberOfSeedPoints.
Tips¶
To resample a CSO to have a particular number of seed points, you can just get the length of the CSO from CSOInfo and compute the desired seed point distance from that.
Windows¶
Default Panel¶
Input Fields¶
inCSOList¶
- name: inCSOList, type: MLBase¶
 The input CSOList, containing CSOs to be resampled. If
Work directly on input CSOList, this list is directly manipulated.
Output Fields¶
outCSOList¶
- name: outCSOList, type: MLBase¶
 The output CSOList, containing resampled CSOs.
Parameter Fields¶
Field Index¶
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
|
  | 
||
  | 
  | 
  | 
  | 
  | 
|
  | 
  | 
|
  | 
  | 
  | 
  | 
  | 
|
  | 
  | 
Visible Fields¶
Mode¶
- name: updateMode, type: Enum, default: AutoClear¶
 The way the module reacts to input changes.
Values:
Title  | 
Name  | 
|---|---|
Off  | 
Off  | 
Auto Update  | 
AutoUpdate  | 
Auto Clear  | 
AutoClear  | 
Update¶
- name: apply, type: Trigger¶
 Trigger to start the computation.
CSO Ids¶
- name: csoIdList, type: String¶
 A blank-separated string of CSO ids to which the computation is restricted. If empty, all CSOs are processed.
Work directly on input CSOList¶
- name: workDirectlyOnInputList, type: Bool, default: TRUE¶
 If true, the
inCSOListis manipulated rather than creating a newoutCSOList.
Enable Undo/Redo¶
Seed Point Distance (in mm)¶
- name: inDistance, type: Double, default: 1¶
 Desired distance between seed points in mm.
Allow smaller distance between last two points¶
- name: inAllowSmallerDistanceBetweenLastTwoPoints, type: Bool, default: TRUE¶
 Typically the desired distances do not add up correctly to the length of the CSO. Should the distance between the last two seed points be smaller or larger than
Seed Point Distance (in mm)?
Minimum Number of Seed Points¶
- name: inMinimumNumberOfSeedPoints, type: Integer, default: 3¶
 The minimum number of seed points to be kept, possibly decreasing the distance.
Use minimum number of seed points¶
- name: inUseMinimumNumberOfSeedPoints, type: Bool, default: FALSE¶
 Should
Minimum Number of Seed Pointsbe kept and the distance be decreased accordingly?