<commit_before>itk_module_test()

set(ITKLevelSetsv4Tests
itkLevelSetDenseImageTest.cxx
itkWhitakerSparseLevelSetImageTest.cxx
itkShiSparseLevelSetImageTest.cxx
itkMalcolmSparseLevelSetImageTest.cxx
# binary image to sparse level set adaptors
itkBinaryImageToWhitakerSparseLevelSetAdaptorTest.cxx
itkBinaryImageToMalcolmSparseLevelSetAdaptorTest.cxx
itkBinaryImageToShiSparseLevelSetAdaptorTest.cxx
itkLevelSetEquationChanAndVeseExternalTermTest.cxx
itkLevelSetEquationChanAndVeseInternalTermTest.cxx
itkLevelSetEquationCurvatureTermTest.cxx
itkLevelSetEquationLaplacianTermTest.cxx
itkLevelSetEquationPropagationTermTest.cxx
itkLevelSetEquationRegionTermTest.cxx
itkLevelSetEquationTermBaseTest.cxx
itkLevelSetEquationTermContainerTest.cxx
# domain partition classes
itkLevelSetDomainPartitionBaseTest.cxx
itkLevelSetDomainMapImageFilterTest.cxx
# level set container
itkDenseLevelSetContainerTest.cxx
itkSparseLevelSetContainerTest.cxx
# single level set
itkSingleLevelSetDenseImage2DTest.cxx
itkSingleLevelSetDenseAdvectionImage2DTest.cxx
itkSingleLevelSetWhitakerImage2DTest.cxx
itkSingleLevelSetMalcolmImage2DTest.cxx
itkSingleLevelSetShiImage2DTest.cxx
itkSingleLevelSetWhitakerImage2DWithCurvatureTest.cxx
itkSingleLevelSetWhitakerImage2DWithLaplacianTest.cxx
itkSingleLevelSetWhitakerImage2DWithPropagationTest.cxx
# two level set
itkTwoLevelSetDenseImage2DTest.cxx
itkTwoLevelSetWhitakerImage2DTest.cxx
itkTwoLevelSetMalcolmImage2DTest.cxx
itkTwoLevelSetShiImage2DTest.cxx
# multi level set
itkMultiLevelSetDenseImageTest.cxx
itkMultiLevelSetChanAndVeseInternalTermTest.cxx
itkMultiLevelSetEvolutionTest.cxx
# stopping criterion
itkLevelSetEvolutionNumberOfIterationsStoppingCriterionTest.cxx
)

CreateTestDriver(ITKLevelSetsv4  "${ITKLevelSetsv4-Test_LIBRARIES}" "${ITKLevelSetsv4Tests}")

itk_add_test(NAME itkLevelSetsv4DenseImageBaseTest
      COMMAND ITKLevelSetsv4TestDriver itkLevelSetDenseImageTest)
itk_add_test(NAME itkWhitakerSparseLevelSetsv4BaseTest
      COMMAND ITKLevelSetsv4TestDriver itkWhitakerSparseLevelSetImageTest)
itk_add_test(NAME itkShiSparseLevelSetsv4BaseTest
      COMMAND ITKLevelSetsv4TestDriver itkShiSparseLevelSetImageTest)
itk_add_test(NAME itkMalcolmSparseLevelSetsv4BaseTest
      COMMAND ITKLevelSetsv4TestDriver itkMalcolmSparseLevelSetImageTest)
# binary image to sparse level set adaptors
itk_add_test(NAME itkBinaryImageToWhitakerSparseLevelSetsv4AdaptorTest
      COMMAND ITKLevelSetsv4TestDriver
      itkBinaryImageToWhitakerSparseLevelSetAdaptorTest
      DATA{${ITK_DATA_ROOT}/Input/circle.png}
      ${ITK_TEST_OUTPUT_DIR}/output_binary_whitaker_adaptor.mha
      ${ITK_TEST_OUTPUT_DIR}/status_binary_whitaker_adaptor.mha
      )
itk_add_test(NAME itkBinaryImageToMalcolmSparseLevelSetsv4AdaptorTest
      COMMAND ITKLevelSetsv4TestDriver
      itkBinaryImageToMalcolmSparseLevelSetAdaptorTest
      DATA{${ITK_DATA_ROOT}/Input/circle.png}
      ${ITK_TEST_OUTPUT_DIR}/output_binary_malcolm_adaptor.mha
      )
itk_add_test(NAME itkBinaryImageToShiSparseLevelSetsv4AdaptorTest
      COMMAND ITKLevelSetsv4TestDriver
      itkBinaryImageToShiSparseLevelSetAdaptorTest
      DATA{${ITK_DATA_ROOT}/Input/circle.png}
      ${ITK_TEST_OUTPUT_DIR}/output_binary_shi_adaptor.mha
      )
# domain partition classes
itk_add_test(NAME itkLevelSetsv4DomainPartitionBaseTest
      COMMAND ITKLevelSetsv4TestDriver itkLevelSetDomainPartitionBaseTest)
itk_add_test(NAME itkLevelSetsv4DomainMapImageFilterTest
      COMMAND ITKLevelSetsv4TestDriver itkLevelSetDomainMapImageFilterTest)
# level set container
itk_add_test(NAME itkLevelSetsv4SparseLevelSetContainerTest
      COMMAND ITKLevelSetsv4TestDriver itkSparseLevelSetContainerTest)
itk_add_test(NAME itkLevelSetsv4DenseLevelSetContainerTest
      COMMAND ITKLevelSetsv4TestDriver itkDenseLevelSetContainerTest)
# single level set
itk_add_test(NAME itkSingleLevelSetsv4DenseImage2DTest
      COMMAND ITKLevelSetsv4TestDriver
      --compare DATA{Baseline/solution_whiteSpot_output_dense_single.mha}
                ${ITK_TEST_OUTPUT_DIR}/whiteSpot_output_dense_single.mha
      itkSingleLevelSetDenseImage2DTest
      DATA{${ITK_DATA_ROOT}/Input/whiteSpot.png} 25 25 25
      ${ITK_TEST_OUTPUT_DIR}/whiteSpot_output_dense_single.mha
)

itk_add_test(NAME itkSingleLevelSetsv4DenseAdvectionImage2DTest_5
      COMMAND ITKLevelSetsv4TestDriver
      # --compare DATA{Baseline/solution_whiteSpot_output_dense_single_5.mha}
      #          ${ITK_TEST_OUTPUT_DIR}/whiteSpot_output_dense_advection_single_5.mha
      itkSingleLevelSetDenseAdvectionImage2DTest
      DATA{${ITK_DATA_ROOT}/Input/whiteSpot.png} 25 25 25
      ${ITK_TEST_OUTPUT_DIR}/whiteSpot_output_dense_advection_single_5.mha
      5
)

itk_add_test(NAME itkSingleLevelSetsv4WhitakerImage2DTest
      COMMAND ITKLevelSetsv4TestDriver
      --compare DATA{Baseline/solution_whiteSpot_output_sparse_single.mha}
                ${ITK_TEST_OUTPUT_DIR}/whiteSpot_output_sparse_single.mha
      itkSingleLevelSetWhitakerImage2DTest
      DATA{${ITK_DATA_ROOT}/Input/whiteSpot.png}
      50
      ${ITK_TEST_OUTPUT_DIR}/whiteSpot_output_sparse_single.mha
)
itk_add_test(NAME itkSingleLevelSetsv4MalcolmImage2DTest
      COMMAND ITKLevelSetsv4TestDriver
      --compare DATA{Baseline/solution_whiteSpot_output_malcolm_single.mha}
                ${ITK_TEST_OUTPUT_DIR}/whiteSpot_output_malcolm_single.mha
      itkSingleLevelSetMalcolmImage2DTest
      DATA{${ITK_DATA_ROOT}/Input/whiteSpot.png}
      15
      ${ITK_TEST_OUTPUT_DIR}/whiteSpot_output_malcolm_single.mha
 )
itk_add_test(NAME itkSingleLevelSetsv4ShiImage2DTest
      COMMAND ITKLevelSetsv4TestDriver
      --compare DATA{Baseline/solution_whiteSpot_output_shi_single.mha}
                ${ITK_TEST_OUTPUT_DIR}/whiteSpot_output_shi_single.mha
      itkSingleLevelSetShiImage2DTest
      DATA{${ITK_DATA_ROOT}/Input/whiteSpot.png}
      15
      ${ITK_TEST_OUTPUT_DIR}/whiteSpot_output_shi_single.mha
)
itk_add_test(NAME itkSingleLevelSetsv4WhitakerImage2DWithCurvatureTest
      COMMAND ITKLevelSetsv4TestDriver
      itkSingleLevelSetWhitakerImage2DWithCurvatureTest
      DATA{${ITK_DATA_ROOT}/Input/whiteSpot.png}
)<commit_msg>BUG: add a test to demonstrate ThreadedIteratorPartitioner bug<commit_after>itk_module_test()

set(ITKLevelSetsv4Tests
itkLevelSetDenseImageTest.cxx
itkWhitakerSparseLevelSetImageTest.cxx
itkShiSparseLevelSetImageTest.cxx
itkMalcolmSparseLevelSetImageTest.cxx
# binary image to sparse level set adaptors
itkBinaryImageToWhitakerSparseLevelSetAdaptorTest.cxx
itkBinaryImageToMalcolmSparseLevelSetAdaptorTest.cxx
itkBinaryImageToShiSparseLevelSetAdaptorTest.cxx
itkLevelSetEquationChanAndVeseExternalTermTest.cxx
itkLevelSetEquationChanAndVeseInternalTermTest.cxx
itkLevelSetEquationCurvatureTermTest.cxx
itkLevelSetEquationLaplacianTermTest.cxx
itkLevelSetEquationPropagationTermTest.cxx
itkLevelSetEquationRegionTermTest.cxx
itkLevelSetEquationTermBaseTest.cxx
itkLevelSetEquationTermContainerTest.cxx
# domain partition classes
itkLevelSetDomainPartitionBaseTest.cxx
itkLevelSetDomainMapImageFilterTest.cxx
# level set container
itkDenseLevelSetContainerTest.cxx
itkSparseLevelSetContainerTest.cxx
# single level set
itkSingleLevelSetDenseImage2DTest.cxx
itkSingleLevelSetDenseAdvectionImage2DTest.cxx
itkSingleLevelSetWhitakerImage2DTest.cxx
itkSingleLevelSetMalcolmImage2DTest.cxx
itkSingleLevelSetShiImage2DTest.cxx
itkSingleLevelSetWhitakerImage2DWithCurvatureTest.cxx
itkSingleLevelSetWhitakerImage2DWithLaplacianTest.cxx
itkSingleLevelSetWhitakerImage2DWithPropagationTest.cxx
# two level set
itkTwoLevelSetDenseImage2DTest.cxx
itkTwoLevelSetWhitakerImage2DTest.cxx
itkTwoLevelSetMalcolmImage2DTest.cxx
itkTwoLevelSetShiImage2DTest.cxx
# multi level set
itkMultiLevelSetDenseImageTest.cxx
itkMultiLevelSetChanAndVeseInternalTermTest.cxx
itkMultiLevelSetEvolutionTest.cxx
# stopping criterion
itkLevelSetEvolutionNumberOfIterationsStoppingCriterionTest.cxx
)

CreateTestDriver(ITKLevelSetsv4  "${ITKLevelSetsv4-Test_LIBRARIES}" "${ITKLevelSetsv4Tests}")

itk_add_test(NAME itkLevelSetsv4DenseImageBaseTest
      COMMAND ITKLevelSetsv4TestDriver itkLevelSetDenseImageTest)
itk_add_test(NAME itkWhitakerSparseLevelSetsv4BaseTest
      COMMAND ITKLevelSetsv4TestDriver itkWhitakerSparseLevelSetImageTest)
itk_add_test(NAME itkShiSparseLevelSetsv4BaseTest
      COMMAND ITKLevelSetsv4TestDriver itkShiSparseLevelSetImageTest)
itk_add_test(NAME itkMalcolmSparseLevelSetsv4BaseTest
      COMMAND ITKLevelSetsv4TestDriver itkMalcolmSparseLevelSetImageTest)
# binary image to sparse level set adaptors
itk_add_test(NAME itkBinaryImageToWhitakerSparseLevelSetsv4AdaptorTest
      COMMAND ITKLevelSetsv4TestDriver
      itkBinaryImageToWhitakerSparseLevelSetAdaptorTest
      DATA{${ITK_DATA_ROOT}/Input/circle.png}
      ${ITK_TEST_OUTPUT_DIR}/output_binary_whitaker_adaptor.mha
      ${ITK_TEST_OUTPUT_DIR}/status_binary_whitaker_adaptor.mha
      )
itk_add_test(NAME itkBinaryImageToMalcolmSparseLevelSetsv4AdaptorTest
      COMMAND ITKLevelSetsv4TestDriver
      itkBinaryImageToMalcolmSparseLevelSetAdaptorTest
      DATA{${ITK_DATA_ROOT}/Input/circle.png}
      ${ITK_TEST_OUTPUT_DIR}/output_binary_malcolm_adaptor.mha
      )
itk_add_test(NAME itkBinaryImageToShiSparseLevelSetsv4AdaptorTest
      COMMAND ITKLevelSetsv4TestDriver
      itkBinaryImageToShiSparseLevelSetAdaptorTest
      DATA{${ITK_DATA_ROOT}/Input/circle.png}
      ${ITK_TEST_OUTPUT_DIR}/output_binary_shi_adaptor.mha
      )
# domain partition classes
itk_add_test(NAME itkLevelSetsv4DomainPartitionBaseTest
      COMMAND ITKLevelSetsv4TestDriver itkLevelSetDomainPartitionBaseTest)
itk_add_test(NAME itkLevelSetsv4DomainMapImageFilterTest
      COMMAND ITKLevelSetsv4TestDriver itkLevelSetDomainMapImageFilterTest)
# level set container
itk_add_test(NAME itkLevelSetsv4SparseLevelSetContainerTest
      COMMAND ITKLevelSetsv4TestDriver itkSparseLevelSetContainerTest)
itk_add_test(NAME itkLevelSetsv4DenseLevelSetContainerTest
      COMMAND ITKLevelSetsv4TestDriver itkDenseLevelSetContainerTest)
# single level set
itk_add_test(NAME itkSingleLevelSetsv4DenseImage2DTest
      COMMAND ITKLevelSetsv4TestDriver
      --compare DATA{Baseline/solution_whiteSpot_output_dense_single.mha}
                ${ITK_TEST_OUTPUT_DIR}/whiteSpot_output_dense_single.mha
      itkSingleLevelSetDenseImage2DTest
      DATA{${ITK_DATA_ROOT}/Input/whiteSpot.png} 25 25 25
      ${ITK_TEST_OUTPUT_DIR}/whiteSpot_output_dense_single.mha
)

itk_add_test(NAME itkSingleLevelSetsv4DenseAdvectionImage2DTest_5
      COMMAND ITKLevelSetsv4TestDriver
      # --compare DATA{Baseline/solution_whiteSpot_output_dense_single_5.mha}
      #          ${ITK_TEST_OUTPUT_DIR}/whiteSpot_output_dense_advection_single_5.mha
      itkSingleLevelSetDenseAdvectionImage2DTest
      DATA{${ITK_DATA_ROOT}/Input/whiteSpot.png} 25 25 25
      ${ITK_TEST_OUTPUT_DIR}/whiteSpot_output_dense_advection_single_5.mha
      5
)

itk_add_test(NAME itkSingleLevelSetsv4WhitakerImage2DTest
      COMMAND ITKLevelSetsv4TestDriver
      --compare DATA{Baseline/solution_whiteSpot_output_sparse_single.mha}
                ${ITK_TEST_OUTPUT_DIR}/whiteSpot_output_sparse_single.mha
      itkSingleLevelSetWhitakerImage2DTest
      DATA{${ITK_DATA_ROOT}/Input/whiteSpot.png}
      50
      ${ITK_TEST_OUTPUT_DIR}/whiteSpot_output_sparse_single.mha
)
itk_add_test(NAME itkSingleLevelSetsv4WhitakerImage2DTestThreads
      COMMAND ITKLevelSetsv4TestDriver
      --with-threads 16
      --compare DATA{Baseline/solution_whiteSpot_output_sparse_single.mha}
                ${ITK_TEST_OUTPUT_DIR}/whiteSpot_output_sparse_single.mha
      itkSingleLevelSetWhitakerImage2DTest
      DATA{${ITK_DATA_ROOT}/Input/whiteSpot.png}
      50
      ${ITK_TEST_OUTPUT_DIR}/whiteSpot_output_sparse_single.mha
)

itk_add_test(NAME itkSingleLevelSetsv4MalcolmImage2DTest
      COMMAND ITKLevelSetsv4TestDriver
      --compare DATA{Baseline/solution_whiteSpot_output_malcolm_single.mha}
                ${ITK_TEST_OUTPUT_DIR}/whiteSpot_output_malcolm_single.mha
      itkSingleLevelSetMalcolmImage2DTest
      DATA{${ITK_DATA_ROOT}/Input/whiteSpot.png}
      15
      ${ITK_TEST_OUTPUT_DIR}/whiteSpot_output_malcolm_single.mha
 )
itk_add_test(NAME itkSingleLevelSetsv4ShiImage2DTest
      COMMAND ITKLevelSetsv4TestDriver
      --compare DATA{Baseline/solution_whiteSpot_output_shi_single.mha}
                ${ITK_TEST_OUTPUT_DIR}/whiteSpot_output_shi_single.mha
      itkSingleLevelSetShiImage2DTest
      DATA{${ITK_DATA_ROOT}/Input/whiteSpot.png}
      15
      ${ITK_TEST_OUTPUT_DIR}/whiteSpot_output_shi_single.mha
)
itk_add_test(NAME itkSingleLevelSetsv4WhitakerImage2DWithCurvatureTest
      COMMAND ITKLevelSetsv4TestDriver
      itkSingleLevelSetWhitakerImage2DWithCurvatureTest
      DATA{${ITK_DATA_ROOT}/Input/whiteSpot.png}
)
{'fraction_non_alphanumeric': 0.04520569372751447, 'fraction_numerical': 0.01392147661504771, 'mean_word_length': 6.888340530536706, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6075337', 'n_tokens_mistral': 4654, 'n_tokens_neox': 4413, 'n_words': 436}