Skip to content

Commit 88673aa

Browse files
committed
ENH: Move fast marching algorithm into this extension from Slicer core
EditorLib was removed from Slicer core in commit Slicer/Slicer@39283db. vtkPichonFastMarching class is moved into this extension, as FastMarching effect uses it.
1 parent e540feb commit 88673aa

7 files changed

Lines changed: 1967 additions & 33 deletions

File tree

Lines changed: 39 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,39 @@
1-
2-
#-----------------------------------------------------------------------------
3-
set(MODULE_NAME SegmentEditorFastMarching)
4-
5-
#-----------------------------------------------------------------------------
6-
set(MODULE_PYTHON_SCRIPTS
7-
${MODULE_NAME}.py
8-
${MODULE_NAME}Lib/__init__.py
9-
${MODULE_NAME}Lib/SegmentEditorEffect.py
10-
)
11-
12-
set(MODULE_PYTHON_RESOURCES
13-
${MODULE_NAME}Lib/SegmentEditorEffect.png
14-
)
15-
16-
#-----------------------------------------------------------------------------
17-
slicerMacroBuildScriptedModule(
18-
NAME ${MODULE_NAME}
19-
SCRIPTS ${MODULE_PYTHON_SCRIPTS}
20-
RESOURCES ${MODULE_PYTHON_RESOURCES}
21-
WITH_GENERIC_TESTS
22-
)
23-
24-
#-----------------------------------------------------------------------------
25-
if(BUILD_TESTING)
26-
# Register the unittest subclass in the main script as a ctest.
27-
# Note that the test will also be available at runtime.
28-
#slicer_add_python_unittest(SCRIPT ${MODULE_NAME}.py)
29-
30-
# Additional build-time testing
31-
#add_subdirectory(Testing)
32-
endif()
1+
2+
#-----------------------------------------------------------------------------
3+
set(MODULE_NAME SegmentEditorFastMarching)
4+
5+
# vtkPichonFastMarching used to be in Slicer core but it was moved
6+
# to this extension in Slicer-4.13.
7+
if(${Slicer_VERSION_MAJOR}.${Slicer_VERSION_MINOR} VERSION_GREATER 4.11)
8+
message(STATUS "Slicer version: ${Slicer_VERSION_MAJOR}.${Slicer_VERSION_MINOR}.${Slicer_VERSION_PATCH}. Building vtkPichonFastMarching locally.")
9+
add_subdirectory(Logic)
10+
endif()
11+
12+
#-----------------------------------------------------------------------------
13+
set(MODULE_PYTHON_SCRIPTS
14+
${MODULE_NAME}.py
15+
${MODULE_NAME}Lib/__init__.py
16+
${MODULE_NAME}Lib/SegmentEditorEffect.py
17+
)
18+
19+
set(MODULE_PYTHON_RESOURCES
20+
${MODULE_NAME}Lib/SegmentEditorEffect.png
21+
)
22+
23+
#-----------------------------------------------------------------------------
24+
slicerMacroBuildScriptedModule(
25+
NAME ${MODULE_NAME}
26+
SCRIPTS ${MODULE_PYTHON_SCRIPTS}
27+
RESOURCES ${MODULE_PYTHON_RESOURCES}
28+
WITH_GENERIC_TESTS
29+
)
30+
31+
#-----------------------------------------------------------------------------
32+
if(BUILD_TESTING)
33+
# Register the unittest subclass in the main script as a ctest.
34+
# Note that the test will also be available at runtime.
35+
#slicer_add_python_unittest(SCRIPT ${MODULE_NAME}.py)
36+
37+
# Additional build-time testing
38+
#add_subdirectory(Testing)
39+
endif()
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
project(vtkSlicer${MODULE_NAME}ModuleLogic)
2+
3+
set(KIT ${PROJECT_NAME})
4+
5+
set(${KIT}_EXPORT_DIRECTIVE "VTK_SLICER_FASTMARCHING_MODULE_LOGIC_EXPORT")
6+
7+
set(${KIT}_INCLUDE_DIRECTORIES
8+
)
9+
10+
set(${KIT}_SRCS
11+
vtkPichonFastMarching.cxx
12+
vtkPichonFastMarching.h
13+
vtkPichonFastMarchingPDF.cxx
14+
vtkPichonFastMarchingPDF.h
15+
)
16+
17+
set(${KIT}_TARGET_LIBRARIES
18+
${VTK_LIBRARIES}
19+
)
20+
21+
#-----------------------------------------------------------------------------
22+
SlicerMacroBuildModuleLogic(
23+
NAME ${KIT}
24+
EXPORT_DIRECTIVE ${${KIT}_EXPORT_DIRECTIVE}
25+
INCLUDE_DIRECTORIES ${${KIT}_INCLUDE_DIRECTORIES}
26+
SRCS ${${KIT}_SRCS}
27+
TARGET_LIBRARIES ${${KIT}_TARGET_LIBRARIES}
28+
)

0 commit comments

Comments
 (0)