-
Notifications
You must be signed in to change notification settings - Fork 170
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
wrap and core ants image local working
- Loading branch information
ncullen93
committed
May 8, 2024
1 parent
150e6f6
commit 4da9ce7
Showing
122 changed files
with
1,733 additions
and
2,682 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
{ | ||
"files.associations": { | ||
"iosfwd": "cpp", | ||
"__bit_reference": "cpp", | ||
"__bits": "cpp", | ||
"__config": "cpp", | ||
"__debug": "cpp", | ||
"__errc": "cpp", | ||
"__functional_base": "cpp", | ||
"__hash_table": "cpp", | ||
"__locale": "cpp", | ||
"__mutex_base": "cpp", | ||
"__node_handle": "cpp", | ||
"__nullptr": "cpp", | ||
"__split_buffer": "cpp", | ||
"__string": "cpp", | ||
"__threading_support": "cpp", | ||
"__tuple": "cpp", | ||
"algorithm": "cpp", | ||
"array": "cpp", | ||
"atomic": "cpp", | ||
"bit": "cpp", | ||
"bitset": "cpp", | ||
"cctype": "cpp", | ||
"chrono": "cpp", | ||
"clocale": "cpp", | ||
"cmath": "cpp", | ||
"complex": "cpp", | ||
"cstdarg": "cpp", | ||
"cstddef": "cpp", | ||
"cstdint": "cpp", | ||
"cstdio": "cpp", | ||
"cstdlib": "cpp", | ||
"cstring": "cpp", | ||
"ctime": "cpp", | ||
"cwchar": "cpp", | ||
"cwctype": "cpp", | ||
"deque": "cpp", | ||
"exception": "cpp", | ||
"fstream": "cpp", | ||
"functional": "cpp", | ||
"initializer_list": "cpp", | ||
"iomanip": "cpp", | ||
"ios": "cpp", | ||
"iostream": "cpp", | ||
"istream": "cpp", | ||
"iterator": "cpp", | ||
"limits": "cpp", | ||
"locale": "cpp", | ||
"memory": "cpp", | ||
"mutex": "cpp", | ||
"new": "cpp", | ||
"optional": "cpp", | ||
"ostream": "cpp", | ||
"ratio": "cpp", | ||
"sstream": "cpp", | ||
"stack": "cpp", | ||
"stdexcept": "cpp", | ||
"streambuf": "cpp", | ||
"string": "cpp", | ||
"string_view": "cpp", | ||
"system_error": "cpp", | ||
"tuple": "cpp", | ||
"type_traits": "cpp", | ||
"typeinfo": "cpp", | ||
"unordered_map": "cpp", | ||
"utility": "cpp", | ||
"vector": "cpp", | ||
"random": "cpp", | ||
"__tree": "cpp", | ||
"any": "cpp", | ||
"cfenv": "cpp", | ||
"condition_variable": "cpp", | ||
"csetjmp": "cpp", | ||
"csignal": "cpp", | ||
"future": "cpp", | ||
"list": "cpp", | ||
"map": "cpp", | ||
"numeric": "cpp", | ||
"queue": "cpp", | ||
"regex": "cpp", | ||
"set": "cpp", | ||
"unordered_set": "cpp", | ||
"valarray": "cpp", | ||
"variant": "cpp", | ||
"*.in": "cpp" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
cmake_minimum_required(VERSION 3.16.3...3.26) | ||
|
||
project(ants LANGUAGES CXX) | ||
|
||
set(CMAKE_POSITION_INDEPENDENT_CODE ON) | ||
|
||
# Try to import all Python components potentially needed by nanobind | ||
find_package(Python 3.8 | ||
REQUIRED COMPONENTS Interpreter Development.Module | ||
OPTIONAL_COMPONENTS Development.SABIModule) | ||
|
||
# Import nanobind through CMake's find_package mechanism | ||
find_package(nanobind CONFIG REQUIRED) | ||
|
||
# TODO: make this run only if ITK + ANTs are not already built (for now: comment these 2 lines out to quickly rebuild antspy) | ||
# TODO: make this handle different OS either here or within the configure script | ||
# TODO: move this outside of CMakeLists.txt like in the old antspy (issue: how to run scripts from pyproject.toml?) | ||
# otherwise you have to comment it out during development | ||
#execute_process(COMMAND bash ${PROJECT_SOURCE_DIR}/scripts/configure_ITK.sh) | ||
#execute_process(COMMAND bash ${PROJECT_SOURCE_DIR}/scripts/configure_ANTs.sh) | ||
|
||
# ITK | ||
set(ITK_DIR "./itkbuild") | ||
find_package(ITK REQUIRED) | ||
include(${ITK_USE_FILE}) | ||
|
||
# ANTS | ||
add_library(antsUtilities STATIC src/antscore/antsUtilities.cxx src/antscore/antsCommandLineOption.cxx src/antscore/antsCommandLineParser.cxx src/antscore/ReadWriteData.cxx src/antscore/ANTsVersion.cxx) | ||
add_library(registrationUtilities STATIC src/antscore/antsRegistrationTemplateHeader.cxx | ||
src/antscore/antsRegistration2DDouble.cxx src/antscore/antsRegistration2DFloat.cxx | ||
src/antscore/antsRegistration3DDouble.cxx src/antscore/antsRegistration3DFloat.cxx | ||
src/antscore/antsRegistration4DDouble.cxx src/antscore/antsRegistration4DFloat.cxx) | ||
|
||
|
||
add_library(imageMathUtilities STATIC src/antscore/ImageMathHelper2D.cxx src/antscore/ImageMathHelper3D.cxx src/antscore/ImageMathHelper4D.cxx) | ||
|
||
# this may not be needed | ||
target_link_libraries(antsUtilities ${ITK_LIBRARIES}) | ||
target_link_libraries(registrationUtilities ${ITK_LIBRARIES}) | ||
target_link_libraries(imageMathUtilities ${ITK_LIBRARIES}) | ||
|
||
nanobind_add_module( | ||
lib | ||
STABLE_ABI | ||
NB_STATIC | ||
src/main.cpp | ||
src/antscore/antsAffineInitializer.cxx | ||
src/antscore/antsApplyTransforms.cxx | ||
src/antscore/antsApplyTransformsToPoints.cxx | ||
src/antscore/antsJointFusion.cxx | ||
src/antscore/antsRegistration.cxx | ||
src/antscore/Atropos.cxx | ||
src/antscore/AverageAffineTransform.cxx | ||
src/antscore/AverageAffineTransformNoRigid.cxx | ||
src/antscore/CreateJacobianDeterminantImage.cxx | ||
src/antscore/DenoiseImage.cxx | ||
src/antscore/iMath.cxx | ||
src/antscore/KellyKapowski.cxx | ||
src/antscore/LabelClustersUniquely.cxx | ||
src/antscore/LabelGeometryMeasures.cxx | ||
src/antscore/N3BiasFieldCorrection.cxx | ||
src/antscore/N4BiasFieldCorrection.cxx | ||
src/antscore/ResampleImage.cxx | ||
src/antscore/ThresholdImage.cxx | ||
src/antscore/TileImages.cxx | ||
) | ||
target_link_libraries(lib PRIVATE ${ITK_LIBRARIES} antsUtilities registrationUtilities imageMathUtilities) | ||
|
||
# Install directive for scikit-build-core | ||
install(TARGETS lib LIBRARY DESTINATION ants) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
|
||
__version__ = '0.5.2' | ||
__version__ = '0.6.0' | ||
|
||
from .core import * | ||
from .utils import * | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.