04c3457ecd75e814774031a81c6bef005d785421,tests/modules/test_dilation.py,,test_run,#Any#Any#Any#Any#,8
Before Change
module.y_name.value = "dilation"
if image.dimensions == 3 or image.multichannel:
module.structuring_element.shape = "ball"
selem = skimage.morphology.ball(1)
else:
selem = skimage.morphology.disk(1)
module.run(workspace)
actual = image_set.get_image("dilation")
desired = skimage.morphology.dilation(image.pixel_data, selem)
numpy.testing.assert_array_equal(actual.pixel_data, desired)
After Change
module.y_name.value = "dilation"
if image.dimensions == 3 or image.multichannel:
// test 3d structuring element
module.structuring_element.shape = "ball"
selem = skimage.morphology.ball(1)
module.run(workspace)
actual = image_set.get_image("dilation")
desired = skimage.morphology.dilation(image.pixel_data, selem)
numpy.testing.assert_array_equal(actual.pixel_data, desired)
// test planewise
selem = skimage.morphology.disk(1)
module.run(workspace)
actual = image_set.get_image("dilation")
desired = numpy.zeros_like(image.pixel_data)
for index, plane in enumerate(image.pixel_data):
desired[index] = skimage.morphology.dilation(plane, selem)
numpy.testing.assert_array_equal(actual.pixel_data, desired)
else:
selem = skimage.morphology.disk(1)
module.run(workspace)
actual = image_set.get_image("dilation")
desired = skimage.morphology.dilation(image.pixel_data, selem)
numpy.testing.assert_array_equal(actual.pixel_data, desired)
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 38
Instances
Project Name: CellProfiler/CellProfiler
Commit Name: 04c3457ecd75e814774031a81c6bef005d785421
Time: 2017-05-08
Author: gandalfisarockstar@gmail.com
File Name: tests/modules/test_dilation.py
Class Name:
Method Name: test_run
Project Name: CellProfiler/CellProfiler
Commit Name: 04c3457ecd75e814774031a81c6bef005d785421
Time: 2017-05-08
Author: gandalfisarockstar@gmail.com
File Name: tests/modules/test_closing.py
Class Name:
Method Name: test_run
Project Name: CellProfiler/CellProfiler
Commit Name: 04c3457ecd75e814774031a81c6bef005d785421
Time: 2017-05-08
Author: gandalfisarockstar@gmail.com
File Name: tests/modules/test_opening.py
Class Name:
Method Name: test_run
Project Name: CellProfiler/CellProfiler
Commit Name: 04c3457ecd75e814774031a81c6bef005d785421
Time: 2017-05-08
Author: gandalfisarockstar@gmail.com
File Name: tests/modules/test_dilation.py
Class Name:
Method Name: test_run
Project Name: CellProfiler/CellProfiler
Commit Name: 04c3457ecd75e814774031a81c6bef005d785421
Time: 2017-05-08
Author: gandalfisarockstar@gmail.com
File Name: tests/modules/test_erosion.py
Class Name:
Method Name: test_run