Comments (17)
Update: we have a version of the involved software which compiles. I will follow up (this week or next) in respective repositories.
from itkelastix.
Initial and incremental builds seem to behave differently. The only idea I have is to rename ITKElastix from Elastix
into something different (ElastixRM
?) to reduce confusion and make debugging this easier.
from itkelastix.
Initial and incremental builds seem to behave differently. The only idea I have is to rename ITKElastix from Elastix into something different (ElastixRM?) to reduce confusion and make debugging this easier.
I am not following the issue. What is the issue, and how does the proposed change help?
CMake Error at C:/Dev/ITK-git-2015/_deps/elx-src/Core/CMakeLists.txt:184 (add_library):
Target "transformix_lib" links to itself.
We may be able to avoid this be specifying the ITK
COMPONENTS
required in these locations:
Line 33 in 532a3fe
https://github.com/SuperElastix/elastix/blob/90122eff6b37a17adc9f5bb3d7bc08608e9c14a6/CMakeLists.txt#L26
from itkelastix.
Now I see what is the problem: there is a true circular dependency. Elastix depends on ITK, and if ITK tries to depend on it via a remote module, the circle of dependence is complete. Just specifying components does not help, because ITKConfig.cmake
contains set(ITK_MODULES_ENABLED "ITKDoubleConversion;...;Elastix;...;ITKWatersheds")
and later itk_module_config(ITK ${ITK_MODULES_ENABLED})
. The first time ITKElastix
is enabled the in-source build can complete. But not subsequently.
One way to resolve this is for HASI to not be an ITK remote module, and just be an application which depends on ITK and Elastix (not good). Maybe another is for Elastix to have its own separate build of ITK (bad). The last is to merge ITKElastix into Elastix, so Elastix can behave as a remote module when being built as part of ITK (requires cooperation of Elastix maintainers).
from itkelastix.
set(ITK_MODULES_ENABLED "ITKDoubleConversion;...;Elastix;...;ITKWatersheds") and later
Right - if COMPONENTS
is specified, Elastix
will not be included per:
from itkelastix.
Specifying components indeed resolves circular dependency when building ITK.
But the link error LINK : fatal error LNK1104: cannot open file 'elastix_lib.lib'
in HASI (log below) persists even with CMake export code. elastix_lib.lib
does not exists, but C:\Dev\ITK-git-2015\lib\Debug\elastix-5.0.lib
does. Maybe we need to do something different from this?
Build started...
1>------ Build started: Project: HASIHeaderTest1, Configuration: Debug x64 ------
2>------ Build started: Project: HASITestDriver, Configuration: Debug x64 ------
3>------ Build started: Project: ITKData, Configuration: Debug x64 ------
4>------ Build started: Project: ClangFormat, Configuration: Debug x64 ------
5>------ Build started: Project: HASIHeaderTestClean, Configuration: Debug x64 ------
6>------ Skipped Build: Project: Continuous, Configuration: Debug x64 ------
6>Project not selected to build for this solution configuration
7>------ Skipped Build: Project: Experimental, Configuration: Debug x64 ------
7>Project not selected to build for this solution configuration
8>------ Skipped Build: Project: Nightly, Configuration: Debug x64 ------
8>Project not selected to build for this solution configuration
9>------ Skipped Build: Project: NightlyMemoryCheck, Configuration: Debug x64 ------
9>Project not selected to build for this solution configuration
10>------ Skipped Build: Project: RUN_TESTS, Configuration: Debug x64 ------
10>Project not selected to build for this solution configuration
11>------ Skipped Build: Project: ITKHeaderTests, Configuration: Debug x64 ------
11>Project not selected to build for this solution configuration
1>LINK : fatal error LNK1104: cannot open file 'elastix_lib.lib'
1>Done building project "HASIHeaderTest1.vcxproj" -- FAILED.
2>LINK : fatal error LNK1104: cannot open file 'elastix_lib.lib'
2>Done building project "HASITestDriver.vcxproj" -- FAILED.
12>------ Skipped Build: Project: INSTALL, Configuration: Debug x64 ------
12>Project not selected to build for this solution configuration
========== Build: 3 succeeded, 2 failed, 3 up-to-date, 7 skipped ==========
from itkelastix.
Great!
Does the ElastixTargets.cmake file have the elastix_lib.lib
configuration, and does it set its path?
Is ElastixTarget.cmake getting sourced in the configuration?
from itkelastix.
ElastixTargets.cmake does have elastix_lib
target and sets its path as so:
# Import target "elastix_lib" for configuration "Debug"
set_property(TARGET elastix_lib APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG)
set_target_properties(elastix_lib PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES_DEBUG "CXX"
IMPORTED_LOCATION_DEBUG "C:/Dev/ITK-git-2015/lib/Debug/elastix-5.0.lib"
)
ElastixConfig.cmake has this line: set( ELASTIX_CONFIG_TARGETS_FILE "${Elastix_DIR}/ElastixTargets.cmake" )
. Is ElastixTargets.cmake supposed to be referenced by ITK? C:\Dev\ITK-git-2015\lib\cmake\ITK-5.2\Modules\Elastix.cmake has this content:
set(Elastix_LOADED 1)
set(Elastix_ENABLE_SHARED "0")
set(Elastix_DEPENDS "ITKCommon;ITKIOImageBase;ITKImageGrid;ITKImageSources;ITKSmoothing")
set(Elastix_PUBLIC_DEPENDS "ITKCommon;ITKIOImageBase;ITKImageGrid;ITKSmoothing")
set(Elastix_TRANSITIVE_DEPENDS "ITKCommon;ITKIOImageBase;ITKImageGrid;ITKImageSources;ITKSmoothing")
set(Elastix_PRIVATE_DEPENDS "")
set(Elastix_LIBRARIES "elastix_lib;transformix_lib")
set(Elastix_INCLUDE_DIRS "")
set(Elastix_LIBRARY_DIRS "")
set(Elastix_RUNTIME_LIBRARY_DIRS "C:/Dev/ITK-git-2015/bin")
set(Elastix_TARGETS_FILE "")
set(Elastix_FACTORY_NAMES "")
set(Elastix_DIR "C:/Dev/ITK-git-2015/_deps/elx-build")
find_package(Elastix REQUIRED)
from itkelastix.
If I manually change set(Elastix_TARGETS_FILE "")
to set(Elastix_TARGETS_FILE "C:/Dev/ITK-git-2015/_deps/elx-build/ElastixTargets.cmake")
the build of HASI succeeds.
from itkelastix.
Is ElastixTargets.cmake supposed to be referenced by ITK?
Yes
The route should be:
- ITK module configuration
- C:\Dev\ITK-git-2015\lib\cmake\ITK-5.2\Modules\Elastix.cmake
- find_package(Elastix REQUIRED)
- ElastixConfig.cmake
- ElastixTargets.cmake
If I manually change set(Elastix_TARGETS_FILE "") to set(Elastix_TARGETS_FILE "C:/Dev/ITK-git-2015/_deps/elx-build/ElastixTargets.cmake") the build of HASI succeeds.
Can we patch elastix/ElastixConfig.cmake.in to address this?
from itkelastix.
My attempt dzenanz@9f21804 does not work. How would modifying elastix/ElastixConfig.cmake.in
affect C:\Dev\ITK-git-2015\lib\cmake\ITK-5.2\Modules\Elastix.cmake
?
from itkelastix.
Uncommenting
Line 64 in 2f5987f
...
Enabled ITKZLIB, requested by ITK_BUILD_DEFAULT_MODULES.
CMake Error at C:/Dev/ITK-git-2015/_deps/elx-build/UseElastix.cmake:22 (include):
The file
C:/Dev/ITK-git-2015/_deps/elx-build/ElastixTargets.cmake
was generated by the export() command. It may not be used as the argument
to the include() command. Use ALIAS targets instead to refer to targets by
alternative names.
Call Stack (most recent call first):
Modules/Remote/Elastix/CMakeLists.txt:64 (include)
Checking for InitOnceExecuteOnce:
...
from itkelastix.
My attempt dzenanz/ITKElastix@9f21804 does not work. How would modifying elastix/ElastixConfig.cmake.in affect C:\Dev\ITK-git-2015\lib\cmake\ITK-5.2\Modules\Elastix.cmake?
The change needs to be made in upstream elastix
.
from itkelastix.
CMake Error at C:/Dev/ITK-git-2015/_deps/elx-build/ElastixConfig.cmake:19 (include):
The file
C:/Dev/ITK-git-2015/_deps/elx-build/ElastixTargets.cmake
was generated by the export() command. It may not be used as the argument
to the include() command. Use ALIAS targets instead to refer to targets by
alternative names.
Call Stack (most recent call first):
Modules/Remote/Elastix/CMakeLists.txt:61 (find_package)
from itkelastix.
from itkelastix.
Has this been addressed?
from itkelastix.
Partly addressed, partly abandoned.
from itkelastix.
Related Issues (20)
- Order of transformparameter files when computing inverse HOT 1
- Method visibility issue with Apple M1 install HOT 1
- Segmentation fault on Apple M2 HOT 4
- Use saved registration to apply for new images HOT 2
- python can't find itk-elastix on arm64 Mac HOT 3
- macOS arm packages missing for 0.18.0 HOT 3
- Update documentation
- External initial transform causes a failure in ConvertToItkTransform HOT 16
- How to convert ITK transform into Elastix transform parameters file? HOT 14
- Saving and Loading Paramter files to reapply transfomr HOT 2
- Histology image registration HOT 5
- `itkwasm-elastix` Site Feedback
- `itk.elastix_registration_method` sometimes crashes silently HOT 2
- Make `itk.ParameterObject` and parameter maps serializable HOT 5
- Segmentation fault on Ubuntu 20.04.6 LTS, x86_64, Python 3.9-3.11 HOT 13
- CORS on loading 3D data HOT 2
- SWIG build warning for `itk::ElastixLogLevel` HOT 3
- Notebook test failures
- Latest ITKElastix crashes HOT 6
- How to minimise non-rigid distortion when using groupwise registration HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from itkelastix.