Skip to content

Commit dbe29b8

Browse files
committed
ENH: Add python testing and I/O moved to Girder
Python testing is now configured for this module. I/O images have been moved to Girder. No OutputBaseline is given. When attemping to configure one I was unable to get a passing test. The example is nearly identical to source ITK's test of this filter, so I assume the scipt works as intended.
1 parent 779409a commit dbe29b8

File tree

7 files changed

+18
-7
lines changed

7 files changed

+18
-7
lines changed

src/Filtering/ImageFeature/AdditiveGaussianNoiseImageFilter/CMakeLists.txt

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,27 @@ install( TARGETS AdditiveGaussianNoiseImageFilter
1313
COMPONENT Runtime
1414
)
1515

16-
install( FILES Code.cxx CMakeLists.txt
16+
install( FILES Code.cxx CMakeLists.txt Code.py
1717
DESTINATION share/ITKExamples/Code/Filtering/ImageFeature/AdditiveGaussianNoiseImageFilter
1818
COMPONENT Code
1919
)
2020

2121
enable_testing()
2222
add_test( NAME AdditiveGaussianNoiseImageFilterTest
2323
COMMAND ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/AdditiveGaussianNoiseImageFilter
24-
${CMAKE_CURRENT_BINARY_DIR}/Gourds8.png
25-
Output.mha
24+
${CMAKE_CURRENT_BINARY_DIR}/Gourds.png
25+
Output.png
26+
20
27+
1
2628
)
2729

30+
if(ITK_WRAP_PYTHON)
31+
find_package(PythonInterp REQUIRED)
32+
add_test( NAME AdditiveGaussianNoiseImageFilterTestPython
33+
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/Code.py
34+
${CMAKE_CURRENT_BINARY_DIR}/Gourds.png
35+
OutputPython.png
36+
20
37+
1
38+
)
39+
endif()

src/Filtering/ImageFeature/AdditiveGaussianNoiseImageFilter/Documentation.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Results
1616
.. figure:: Gourds8.png
1717
:alt: Input Image
1818
Input Image
19-
.. figure:: GourdsFilter.png
19+
.. figure:: OutputImage.png
2020
:alt: Output Image
2121
Output Image
2222

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
859fd5a9de82ac8bbdf81c1c75548ce340c36c46396c8f63bbe709fe572af54df3bf69e18ece04e84977db3fee7aafc50ea6d51926cec1891661fb45a1762907
Binary file not shown.
Binary file not shown.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
fc5bb2719fd5b6e926cfcd878063b7403f10030d07e2d89eb4cf8af92ab533414b860063575d6d143f960be46322bfaca9cec2033a59f7f8e6db1fe337a9477c

src/Filtering/ImageFeature/CMakeLists.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,3 @@ add_example(FindZeroCrossings)
3737
endif()
3838

3939
add_example(AdditiveGaussianNoiseImageFilter)
40-
compare_to_baseline(EXAMPLE_NAME AdditiveGaussianNoiseImageFilter
41-
BASELINE_PREFIX OutputBaseline
42-
)

0 commit comments

Comments
 (0)