TestCenter Reference
HelperFunctions.py File Reference

Go to the source code of this file.

Namespaces

 TestSupport.HelperFunctions
 

Functions

def TestSupport.HelperFunctions.generateTestDictionary (function, testDictionaries)
 Concatenates test dictionaries and sets a function that needs to be tested in the final dictionary. More...
 
def TestSupport.HelperFunctions.initModuleFromTemplate (targetModuleName, templateModuleName=None, fieldValueOverrides=None, alsoInitNonEditableFields=False)
 Copies all values from a reference module's editable parameter fields to the target ('test') module. More...
 
def TestSupport.HelperFunctions.getMinMax (fv1, fv2=None)
 Determines max/min value of given fill value(s). More...
 
def TestSupport.HelperFunctions.getNumComponentsFromImage (imageField)
 Returns the number of components of an ML-image data type. More...
 
def TestSupport.HelperFunctions.getNumComponentsFromString (dataType)
 Returns the number of components of a data type given as string. More...
 
def TestSupport.HelperFunctions.getNumpyTypeFromImage (imageField, context=None)
 Returns the NumPy data type of an ML-Image. More...
 
def TestSupport.HelperFunctions.getNumpyTypeFromString (dataType)
 Returns the NumPy data type appropriate to a data type given as string. More...
 
def TestSupport.HelperFunctions.castToNumpy (value, numpyType)
 Casts a value to a NumPy type. More...
 
def TestSupport.HelperFunctions.convertVoxelType (voxel, oldType, newType)
 Converts a voxel to a new data type. More...
 
def TestSupport.HelperFunctions.getImage3D (imageField, imageStart=(0, 0, 0), imageSize=None, context=None)
 Returns ML image output of given module in 3 dimensions. More...
 
def TestSupport.HelperFunctions.getImage6D (imageField, imageStart=(0, 0, 0, 0, 0, 0), imageSize=None, context=None)
 Returns ML image output of given module in 6 dimensions. More...
 
def TestSupport.HelperFunctions.compareImages3D (resultImage, expectedImage)
 Compares voxels of a result image with an expected image in 3 dimensions. More...
 
def TestSupport.HelperFunctions.compareImages6D (resultImage, expectedImage)
 Compares voxels of a result image with an expected image in 6 dimensions. More...
 

Variables

bool TestSupport.HelperFunctions.LOGVOXEL = False
 
bool TestSupport.HelperFunctions.LOGONSUCCESS = False
 
float TestSupport.HelperFunctions.EPSILON = 0.0001
 
dictionary TestSupport.HelperFunctions.INTTYPES