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

../../../Modules/ML/MLCSOMiscModulesStable/mhelp/Images/Screenshots/CSOResample._default.png

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

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 inCSOList is manipulated rather than creating a new outCSOList.

Enable Undo/Redo

name: useUndoRedo, type: Bool, default: TRUE

If true, the changes to the inCSOList can be undone.

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 Points be kept and the distance be decreased accordingly?

Hidden Fields

autoApply

name: autoApply, type: Bool, default: FALSE

isProcessing

name: isProcessing, type: Bool, persistent: no

done

name: done, type: Trigger, persistent: no

emptyGroupBeforeGeneration

name: emptyGroupBeforeGeneration, type: Bool, default: FALSE

addCSOToGroupMode

name: addCSOToGroupMode, type: Enum, default: AddToGroupByLabel

Values:

Title Name
None AddToGroupNone
By Label AddToGroupByLabel
By Id AddToGroupById

addCSOToGroupWithLabel

name: addCSOToGroupWithLabel, type: String

addCSOToGroupWithId

name: addCSOToGroupWithId, type: Integer, default: -1

id

name: id, type: Integer, default: 0

pathPointStyle

name: pathPointStyle, type: Enum, default: LineStyleSolid

Values:

Title Name
None LineStyleNone
Solid LineStyleSolid
Dashed LineStyleDashed
Dotted LineStyleDotted
Short Dashed LineStyleShortDashed

pathPointWidth

name: pathPointWidth, type: Float, default: 1

pathPointColor

name: pathPointColor, type: Color, default: 1 1 0

pathPointAlpha

name: pathPointAlpha, type: Float, default: 1

seedPointStyle

name: seedPointStyle, type: Enum, default: MarkerModeRect

Values:

Title Name
None MarkerModeNone
Rect MarkerModeRect
Circle MarkerModeCircle
Fixed Circle MarkerModeFixedCircle
Triangle MarkerModeTriangle
Filled Rect MarkerModeFilledRect
Filled Circle MarkerModeFilledCircle
Filled Triangle MarkerModeFilledTriangle
Dashed Rectangle MarkerModeDashedRectangle

seedPointSize

name: seedPointSize, type: Float, default: 2

seedPointColor

name: seedPointColor, type: Color, default: 0 1 0

seedPointAlpha

name: seedPointAlpha, type: Float, default: 1

voxelWriteMode

name: voxelWriteMode, type: Enum, default: VoxelWriteModeModule

Values:

Title Name
Id VoxelWriteModeId
Const VoxelWriteModeConst
Const Plus Id VoxelWriteModeConstPlusId
Module VoxelWriteModeModule

voxelWriteValue

name: voxelWriteValue, type: Float, default: 1024

changeSettingsForModifiedCSOs

name: changeSettingsForModifiedCSOs, type: Bool, default: FALSE

listenToFinishingNotifications

name: listenToFinishingNotifications, type: Bool, default: TRUE

listenToSelectionNotifications

name: listenToSelectionNotifications, type: Bool, default: TRUE