| 1 | #!/bin/sh |
| 2 | # autopkgtest check: run the test program shipped in the source package, |
| 3 | # adapted for nrrd files (adding a factory, setting the name of the entry |
| 4 | # function to "main"). |
| 5 | # (C) 2024 Pierre Gruet. |
| 6 | # Author: Pierre Gruet <[email protected]> |
| 7 | |
| 8 | set -e |
| 9 | |
| 10 | WORKDIR=$(mktemp -d) |
| 11 | trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM |
| 12 | |
| 13 | cp debian/tests/itkAdaptiveNonLocalMeansDenoisingImageFilterTest.cxx test/Input/r16slice.nrrd $WORKDIR |
| 14 | cd $WORKDIR |
| 15 | |
| 16 | # Get ITK major.minor version number to invoke the linker. |
| 17 | ITK_MINOR=$(dpkg --list | sed -n 's/.*libinsighttoolkit\([0-9]\+\.[0-9]\+\).*/\1/p') |
| 18 | |
| 19 | # Building |
| 20 | g++ -Wall -Wextra -I /usr/include/ITK-${ITK_MINOR}/ itkAdaptiveNonLocalMeansDenoisingImageFilterTest.cxx -lITKCommon-${ITK_MINOR} -litksys-${ITK_MINOR} -litkvnl-${ITK_MINOR} -lITKIOImageBase-${ITK_MINOR} -litkvnl_algo-${ITK_MINOR} -lITKIONRRD-${ITK_MINOR} -litkadaptivedenoising -o adaptiveNonLocalMeansDenoisingImageFilterTest |
| 21 | |
| 22 | # Running |
| 23 | ./adaptiveNonLocalMeansDenoisingImageFilterTest r16slice.nrrd out0.nrrd 0 |
| 24 | ./adaptiveNonLocalMeansDenoisingImageFilterTest r16slice.nrrd out1.nrrd 1 |