Skip to content

Commit

Permalink
ENH: Add python testing and I/O moved to Girder
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
mseng10 committed May 1, 2020
1 parent 779409a commit dbe29b8
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,27 @@ install( TARGETS AdditiveGaussianNoiseImageFilter
COMPONENT Runtime
)

install( FILES Code.cxx CMakeLists.txt
install( FILES Code.cxx CMakeLists.txt Code.py
DESTINATION share/ITKExamples/Code/Filtering/ImageFeature/AdditiveGaussianNoiseImageFilter
COMPONENT Code
)

enable_testing()
add_test( NAME AdditiveGaussianNoiseImageFilterTest
COMMAND ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/AdditiveGaussianNoiseImageFilter
${CMAKE_CURRENT_BINARY_DIR}/Gourds8.png
Output.mha
${CMAKE_CURRENT_BINARY_DIR}/Gourds.png
Output.png
20
1
)

if(ITK_WRAP_PYTHON)
find_package(PythonInterp REQUIRED)
add_test( NAME AdditiveGaussianNoiseImageFilterTestPython
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/Code.py
${CMAKE_CURRENT_BINARY_DIR}/Gourds.png
OutputPython.png
20
1
)
endif()
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Results
.. figure:: Gourds8.png
:alt: Input Image
Input Image
.. figure:: GourdsFilter.png
.. figure:: OutputImage.png
:alt: Output Image
Output Image

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
859fd5a9de82ac8bbdf81c1c75548ce340c36c46396c8f63bbe709fe572af54df3bf69e18ece04e84977db3fee7aafc50ea6d51926cec1891661fb45a1762907
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fc5bb2719fd5b6e926cfcd878063b7403f10030d07e2d89eb4cf8af92ab533414b860063575d6d143f960be46322bfaca9cec2033a59f7f8e6db1fe337a9477c
3 changes: 0 additions & 3 deletions src/Filtering/ImageFeature/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,3 @@ add_example(FindZeroCrossings)
endif()

add_example(AdditiveGaussianNoiseImageFilter)
compare_to_baseline(EXAMPLE_NAME AdditiveGaussianNoiseImageFilter
BASELINE_PREFIX OutputBaseline
)

0 comments on commit dbe29b8

Please sign in to comment.