def test_cast_output_as_types(aorta_image, outputType, expected_type): shifter = imageshiftscale.vmtkImageShiftScale() shifter.Image = aorta_image shifter.OutputType = outputType shifter.Execute() assert shifter.Image.GetScalarTypeAsString() == expected_type
def test_scale_value_negative(aorta_image, compare_images): name = __name__ + '_test_scale_value_negative.mha' shifter = imageshiftscale.vmtkImageShiftScale() shifter.Image = aorta_image shifter.Scale = -2.1 shifter.Execute() assert compare_images(shifter.Image, name) == True
def test_shift_value_positive(aorta_image, compare_images): name = __name__ + '_test_shift_value_positive.mha' shifter = imageshiftscale.vmtkImageShiftScale() shifter.Image = aorta_image shifter.Shift = 10.3 shifter.Execute() assert compare_images(shifter.Image, name) == True
def test_map_ranges(aorta_image, compare_images, outputRange, paramid): name = __name__ + '_test_map_ranges_' + paramid + '.mha' shifter = imageshiftscale.vmtkImageShiftScale() shifter.Image = aorta_image shifter.MapRanges = 1 shifter.OutputRange = outputRange shifter.Execute() assert compare_images(shifter.Image, name) == True