File: CMakeLists.txt

package info (click to toggle)
insighttoolkit4 4.13.3withdata-dfsg1-4
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 489,260 kB
  • sloc: cpp: 557,342; ansic: 146,850; fortran: 34,788; python: 16,572; sh: 2,187; lisp: 2,070; tcl: 993; java: 362; perl: 200; makefile: 129; csh: 81; pascal: 69; xml: 19; ruby: 10
file content (83 lines) | stat: -rw-r--r-- 3,014 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
set(TEMP ${ITK_BINARY_DIR}/Testing/Temporary)

if(ITK_WRAP_PYTHON)
  INTERSECTION(WRAP_2 2 "${ITK_WRAP_IMAGE_DIMS}")

  if(ITK_WRAP_signed_short AND ITK_WRAP_unsigned_char AND WRAP_2)
    itk_python_add_test(NAME DicomSliceReadPythonTest
      TEST_DRIVER_ARGS
        --compare ${TEMP}/DicomSliceReadPythonOutput.png
          DATA{${ITK_SOURCE_DIR}/Examples/IO/test/Baseline/DicomSliceReadPythonOutputBaseline.png}
      COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/../DicomSliceRead.py
        DATA{${ITK_DATA_ROOT}/Input/dicom-sc_cs-1.dcm}
        ${TEMP}/DicomSliceReadPythonOutput.png
      )
  endif()
endif()

if(ITK_BUILD_SHARED_LIBS)
  itk_add_test( NAME ExampleIOPluginTest
    COMMAND itkTestDriver  --add-before-env ITK_AUTOLOAD_PATH "$<TARGET_FILE_DIR:FileFreeTestLib>"
      "$<TARGET_FILE:IOPlugin>"
      "FileFreeIO::Size=128,256:Spacing=.5,.8:Origin=5,6:Direction=-1,0,0,-1"
      "${ITK_TEST_OUTPUT_DIR}ExampleIOPluginTest.png"
      )
  itk_add_test( NAME ExampleIOPluginTest2
    COMMAND itkTestDriver
      "$<TARGET_FILE:IOPlugin>"
      "FileFreeIO::Size=128,256:Spacing=.5,.8:Origin=5,6:Direction=-1,0,0,-1"
      "${ITK_TEST_OUTPUT_DIR}ExampleIOPluginTest2.png"
      "$<TARGET_FILE_DIR:FileFreeTestLib>"
      )

endif()

# Test ITK ImageIO factory registrations.
# Please refer to CMake/UseITK.cmake for all the image IO registartion handeling.

# Collecting image format's description into a string for verification
set(REGEX_IO_Factory_Description_First_Word  "")
foreach(ImageFormat ${LIST_OF_IMAGEIO_FORMATS})
  if (${${ImageFormat}_imageio_module_name}_ENABLED)
    if (NOT REGEX_IO_Factory_Description_First_Word)
      set (REGEX_IO_Factory_Description_First_Word ${ImageFormat})
    else()
      set (REGEX_IO_Factory_Description_First_Word"${REGEX_IO_Factory_Description_First_Word} ${ImageFormat}")
    endif()
  endif()
endforeach()

itk_add_test( NAME ImageIOFactoryRegisterTest
    COMMAND ${ITK_TEST_DRIVER}
    $<TARGET_FILE:IOFactoryRegistration>
    )
set_tests_properties (ImageIOFactoryRegisterTest
  PROPERTIES PASS_REGULAR_EXPRESSION  ${REGEX_IO_Factory_Description_First_Word})


if(ITK_VISIBLEHUMAN_DATA_ROOT)
  itk_add_test(NAME VisibleHumanStreamReadWriteTest
    COMMAND ${ITK_TEST_DRIVER}
   $<TARGET_FILE:VisibleHumanStreamReadWrite>
    ${ITK_VISIBLEHUMAN_DATA_ROOT}/Male/Fullcolor/fullbody/
    ${TEMP}/VisibleHumanStreamReadWrite.mha )
  itk_add_test(NAME VisibleHumanPasteWriteTest
    COMMAND ${ITK_TEST_DRIVER}
   $<TARGET_FILE:VisibleHumanPasteWrite>
    ${TEMP}/VisibleHumanStreamReadWrite.mha
    ${TEMP}/VisibleHumanPasteWrite.mha)
  # this test must be run sequentially, be cause the output of the first is used by the second
  set_tests_properties(
    VisibleHumanStreamReadWriteTest
    PROPERTIES
    LABELS BigIO
    )
  set_tests_properties(
    VisibleHumanPasteWriteTest
    PROPERTIES
    DEPENDS VisibleHumanStreamReadWriteTest
    )
endif()

itk_add_test(NAME TransformReadWriteTest
  COMMAND TransformReadWrite ${TEMP}/TransformReadWrite.h5 )