def setFeatureClassAndTestCase(self, className, test):
    '\n    Set testing suite to specified testCase and feature class. Throws an assertion error if either class or test case\n    are not recognized. These have to be set here together, as the settings with which the test case has to be loaded\n    are defined per feature class in the baseline (extracted from provenance information).\n\n    Only (re)loads an image/mask if the test case has changed, or the change of feature class causes a change in test\n    settings.\n\n    If feature class and test case are unchanged, nothing is reloaded and function returns False. If either feature\n    class or test case is changed, function returns True.\n    '
    global TEST_CASES
    if ((self._featureClassName == className) and (self._test == test)):
        return False
    self._test = test
    self._testedSet.add(self._test)
    if (self._featureClassName != className):
        self._logger.debug('Setting feature class name to %s', className)
        assert (className in self._baseline.keys())
        self._featureClassName = className
        if (self._current_config != self._baseline[className].getTestConfig(test)):
            self._current_config = self._baseline[className].getTestConfig(test)
            self._testCase = None
    if (self._testCase != self._current_config['TestCase']):
        self._testCase = self._current_config['TestCase']
        self._logger.info('Reading the image and mask for test case %s', self._testCase)
        assert (self._current_config['TestCase'] in TEST_CASES)
        (imageName, maskName) = getTestCase(self._testCase)
        assert (imageName is not None)
        assert (maskName is not None)
        self._image = sitk.ReadImage(imageName)
        self._mask = sitk.ReadImage(maskName)
        if ('ImageHash' in self._current_config):
            assert (sitk.Hash(self._image) == self._current_config['ImageHash'])
        if ('MaskHash' in self._current_config):
            assert (sitk.Hash(self._mask) == self._current_config['MaskHash'])
        settings = self._current_config.get('Settings', {})
        interpolator = settings.get('interpolator', sitk.sitkBSpline)
        resampledPixelSpacing = settings.get('resampledPixelSpacing', None)
        if ((interpolator is not None) and (resampledPixelSpacing is not None)):
            (self._image, self._mask) = imageoperations.resampleImage(self._image, self._mask, resampledPixelSpacing, interpolator, settings.get('label', 1), settings.get('padDistance', 5))
        (self._bb, correctedMask) = imageoperations.checkMask(self._image, self._mask, **settings)
        if (correctedMask is not None):
            self._mask = correctedMask
        self._imageType = None
    return True
Set testing suite to specified testCase and feature class. Throws an assertion error if either class or test case
are not recognized. These have to be set here together, as the settings with which the test case has to be loaded
are defined per feature class in the baseline (extracted from provenance information).

Only (re)loads an image/mask if the test case has changed, or the change of feature class causes a change in test
settings.

If feature class and test case are unchanged, nothing is reloaded and function returns False. If either feature
class or test case is changed, function returns True.
def setFeatureClassAndTestCase(self, className, test):
    '\n    Set testing suite to specified testCase and feature class. Throws an assertion error if either class or test case\n    are not recognized. These have to be set here together, as the settings with which the test case has to be loaded\n    are defined per feature class in the baseline (extracted from provenance information).\n\n    Only (re)loads an image/mask if the test case has changed, or the change of feature class causes a change in test\n    settings.\n\n    If feature class and test case are unchanged, nothing is reloaded and function returns False. If either feature\n    class or test case is changed, function returns True.\n    '
    global TEST_CASES
    if ((self._featureClassName == className) and (self._test == test)):
        return False
    self._test = test
    self._testedSet.add(self._test)
    if (self._featureClassName != className):
        self._logger.debug('Setting feature class name to %s', className)
        assert (className in self._baseline.keys())
        self._featureClassName = className
        if (self._current_config != self._baseline[className].getTestConfig(test)):
            self._current_config = self._baseline[className].getTestConfig(test)
            self._testCase = None
    if (self._testCase != self._current_config['TestCase']):
        self._testCase = self._current_config['TestCase']
        self._logger.info('Reading the image and mask for test case %s', self._testCase)
        assert (self._current_config['TestCase'] in TEST_CASES)
        (imageName, maskName) = getTestCase(self._testCase)
        assert (imageName is not None)
        assert (maskName is not None)
        self._image = sitk.ReadImage(imageName)
        self._mask = sitk.ReadImage(maskName)
        if ('ImageHash' in self._current_config):
            assert (sitk.Hash(self._image) == self._current_config['ImageHash'])
        if ('MaskHash' in self._current_config):
            assert (sitk.Hash(self._mask) == self._current_config['MaskHash'])
        settings = self._current_config.get('Settings', {})
        interpolator = settings.get('interpolator', sitk.sitkBSpline)
        resampledPixelSpacing = settings.get('resampledPixelSpacing', None)
        if ((interpolator is not None) and (resampledPixelSpacing is not None)):
            (self._image, self._mask) = imageoperations.resampleImage(self._image, self._mask, resampledPixelSpacing, interpolator, settings.get('label', 1), settings.get('padDistance', 5))
        (self._bb, correctedMask) = imageoperations.checkMask(self._image, self._mask, **settings)
        if (correctedMask is not None):
            self._mask = correctedMask
        self._imageType = None
    return True