File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ itk_python_expression_add_test (
2+ NAME itkOpenSlideImageIOPythonInstantiationTest
3+ EXPRESSION "io = itk.OpenSlideImageIO.New()"
4+ )
5+
6+ set (test_input_dir ${CMAKE_CURRENT_SOURCE_DIR} /../../test/Input)
7+ # cmake_path(CONVERT ${test_input_dir} TO_CMAKE_PATH_LIST test_input_dir NORMALIZE) # CMake 3.20+
8+
9+ list (FIND ITK_WRAP_IMAGE_DIMS 2 wrap_2_index)
10+ if (wrap_2_index GREATER -1)
11+ itk_python_add_test (NAME itkOpenSlideTestBasicIOPython
12+ TEST_DRIVER_ARGS
13+ --compare DATA{${test_input_dir}/CMU-1-Small-Region.mha} ${ITK_TEST_OUTPUT_DIR} /CMU-1-Small-Region-Python.mha
14+ COMMAND convert_test.py
15+ DATA{${test_input_dir}/CMU-1-Small-Region.svs}
16+ ${ITK_TEST_OUTPUT_DIR} /CMU-1-Small-Region-Python.mha
17+ )
18+ endif ()
Original file line number Diff line number Diff line change 1+ import sys
2+ import itk
3+
4+ image = itk .imread (sys .argv [1 ])
5+ itk .imwrite (image , sys .argv [2 ])
You can’t perform that action at this time.
0 commit comments