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.
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). |
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). |