XMarkerSamplePattern

MLModule

genre

Marker

author

Ola Friman

package

FMEwork/ReleaseMeVis

dll

MLXMarkerUtils

definition

MLXMarkerUtils.def

keywords

xmarker, pattern, resample, sphere, circle, mpr, vessel, centerline, points

Purpose

The module XMarkerSamplePattern samples a circle or sphere pattern in 3D around an input position given by an XMarker.

The samples are returned as XMarkers in an XMarkerList. The module was originally written to sample the cross-sections and regions around a vessel.

Usage

The minimal input to the module is an XMarkerList with one XMarker.

When the input XMarkerList contains more than one XMarker, an Input XMarker Index to Use must be chosen.

Details

For calculating the normal vector of the circle, a Neighbor Difference mode is available. In this mode, the normal vector is calculated as the forward difference, i.e., ni = xi+1 - xi, of the input XMarkers. For the last XMarker in the input list, a backward difference is used.

For the sphere pattern, predefined sample directions are defined. These directions were obtained using tessellations (0-, 1-, 2-, 3- and 4-fold) of an icosahedron. If v is a direction in this set, -v is also a direction. The mirrored directions are stored interleaved in the output XMarkerList, i.e, if v is stored at index 0, -v is stored at index 1.

Windows

Default Panel

../../../Modules/ML/MLXMarkerUtils/mhelp/Images/Screenshots/XMarkerSamplePattern._default.png

Input Fields

inputXMarkerList

name: inputXMarkerList, type: MLBase

Output Fields

outputXMarkerList

name: outputXMarkerList, type: MLBase

Parameter Fields

Field Index

Auto update: Bool

Samples for Circle Pattern: Integer

End Angle: Double

Samples for Sphere Pattern: Enum

Input XMarker Index to Use: Integer

Start Angle: Double

Message: String

Update: Trigger

Normal Calculation: Enum

Output Representation: Enum

Pattern Type: Enum

Radius: Float

Visible Fields

Samples for Circle Pattern

name: nbrOfCircleSamples, type: Integer, default: 20

Sets the number of samples when the pattern is a circle.

Samples for Sphere Pattern

name: nbrOfSphereSamples, type: Enum, default: 42

Defines the number of samples to generate for a sphere pattern.

Only a predefined number of directions is available.

Values:

Title

Name

​12

​12

​42

​42

​162

​162

​642

​642

Output Representation

name: representation, type: Enum, default: Points

Defines how the sampled pattern is represented in the output XMarkers.

Values:

Title

Name

Description

​Points

​Points

​The samples are represented using the point positions in the XMarkers.

​Vectors

​Vectors

​The vectors from the middle point to the samples on the patterns are stored in the XMarkers. See the image below for an illustration. Note that the circle pattern in general is in 3D; the examples below were created with a normal direction of (x,y,z) = (0,0,1).

../../../Modules/ML/MLXMarkerUtils/mhelp/Images/XMarkerCircle_im1.jpg

Radius

name: radius, type: Float, default: 5

Sets the radius of the pattern.

Start Angle

name: startAngle, type: Double, default: 0

Sets a starting angle for the pattern.

End Angle

name: endAngle, type: Double, default: 3.14159265358979

Sets an ending angle for the pattern.

Pattern Type

name: patternType, type: Enum, default: Circle

Defines the pattern type.

Values:

Title

Name

​Circle

​Circle

​Sphere

​Sphere

​Circle Sector

​Circle Sector

Normal Calculation

name: normalCalculation, type: Enum, default: NeighborDifference

Defines how the normals should be calculated.

Values:

Title

Name

Description

​Neighbor Difference

​NeighborDifference

​The normal to the circle plane is calculated as the difference between successive input XMarkers.

​Internal Vector

​InternalVector

​The vector in each XMarker is used as normal (the vector must exist).

Input XMarker Index to Use

name: inputXMarkerIndex, type: Integer, default: 0

Sets the index of the input marker to use if more than one marker is present.

Message

name: messageString, type: String

Shows a message about the state of the module.

Update

name: updateButton, type: Trigger

If pressed, the module computes anew.

Auto update

name: autoUpdateToggle, type: Bool, default: TRUE

If checked, the module computes anew on any parameter or input change.