CompareInventorSceneSampling¶
-
MLModule
¶ author Wolf Spindler
package FMEstable/ReleaseMeVis
dll MLCompareInventorSceneSampling
definition CompareInventorSceneSampling.def see also OffscreenRenderer
,VoxelizeInventorScene
,ImageCompare
,DicomTreeCompare
keywords offscreen
,rendering
,testing
,comparison
,inventor
,scene
,graph
Purpose¶
CompareInventorSceneSampling
allows the storage of an Open Inventor scene as rendered primitives and provides comparison functionality to check whether a stored scene equals the currently connected one. Therefore it is a useful module to write tests for scene object modules.
Caveats:
- Primitives can only be compared if the Open Inventor modules which generate them also implement the SoCallbackAction correctly.
- Texture features are compared, however, but not the contents of the texture images themselves.
- On SoText2 nodes all field contents are also stored and restored for comparisons although not rendered as primitives. It has been implemented as special case since it’s often used and important for testing.
Input Fields¶
Parameter Fields¶
Field Index¶
Compare : Trigger |
Post ML error on failure : Bool |
Error Post Prefix : String |
Remove File : Trigger |
File Name : String |
Save : Trigger |
Float Epsilon : Float |
Status : String |
Num Lines : Integer |
Test Passed : Bool |
Num Primitives : Integer |
|
Num Triangles : Integer |
|
Num Vertices : Integer |
Visible Fields¶
File Name¶
-
name:
fileName
, type:
String
¶ The file name in which the primitives can be stored or from which the primitives are read when compared.
Save¶
Remove File¶
Compare¶
-
name:
compare
, type:
Trigger
¶ Renders the connected scene graph as primitives and compares them with those loaded from the file defined in
File Name
. If they equal theTest Passed
is enabled, otherwise disabled. IfPost ML error on failure
is enabled and comparison fails then also an ML error is posted as described forPost ML error on failure
.
Float Epsilon¶
-
name:
floatEpsilon
, type:
Float
, default:
0.001
, minimum:
0
¶ When comparing a primitives from a stored file and rendered ones from the connected input scene then floating point numbers typically will normally differ due imprecise numerical calculations. This epsilon is the maximum difference allowed between floating point number before they are considered different.
Post ML error on failure¶
-
name:
postMLErrorOnFailure
, type:
Bool
, default:
TRUE
¶ If enabled and a comparison with
Compare
or a save operation withSave
fails, then an ML error is posted to the ML error handler. This is useful to make scene equality tests fail. If disabled then onlyStatus
andTest Passed
will show information about the success of the recent operations.
Error Post Prefix¶
-
name:
errorPostPrefix
, type:
String
, default:
Failure in scene primitive operation:
¶ Only sensitive if
Post ML error on failure
is enabled. If that one is on and an operation fails then the posted ML error log will getError Post Prefix
as prefix. This can be useful to describe the type of the error, or to make differences to the results of other compare modules more obvious.
Num Primitives¶
-
name:
numPrimitives
, type:
Integer
, minimum:
0
, persistent:
no
¶ Shows the whole number of stored primitives (vertices+lines+triangles) after save operations.
Num Vertices¶
-
name:
numVertices
, type:
Integer
, minimum:
0
, persistent:
no
¶ Shows the number of stored vertices after save operations.
Num Lines¶
-
name:
numLines
, type:
Integer
, minimum:
0
, persistent:
no
¶ Shows the number of stored lines after save operations.
Num Triangles¶
-
name:
numTriangles
, type:
Integer
, minimum:
0
, persistent:
no
¶ Shows the number of stored triangles after save operations.
Test Passed¶
-
name:
testPassed
, type:
Bool
, persistent:
no
¶ Checked after a successful compare operation with
Compare
, otherwise false. Can be used to test for a successful operation, especially if ML error posting withPost ML error on failure
is disabled.