InsightSoftwareConsortium/ITK

Open the Module_ Montage=ON and ITK_ WRAP_ PYTHON=ON option to compile. The compiled result does not support itk montage

Opened this issue · 7 comments

Description

Hello, sir. I recently encountered the same problem as #3124, so I tried to compile my own version of itk on Linux. I compiled according to the method in question #3124 and opened the options Module_ Montage=ON ,ITK_ WRAP_ PYTHON=ON and TK_WRAP_rgb_unsigned_short=ON. Although the compiled results already support the data type itk. RGBPixel [itk. US], it seems that itk-montage has not been compiled at the same time.

I have contacted the questioner of question #3124. In fact, my compilation process is under his guidance. He compiles with cmake.exe on Windows, and I compile with my own cmakeList.txt on Linux. In addition, our method, the compiled itk version (5.2.1) and other conditions are the same, but different results are obtained.

The final results are as follows:
Results generated by previous questioners using cmake.exe on Windows
image
The results I generated with cmakelist.txt on Linux
image
Obviously, my method does not compile the following itk-montage related functions
image

The previous questioner was also unable to help me solve the problem, because we have the same options except for the operating system and the tools used, so we want to ask for your help.

The following are CMakeLists.txt and manylinux-build-wheels.sh files I wrote. I submitted the manylinux-build-wheels.sh file by the way, because I found that the compiled script essentially calls manylinux-build-wheels.sh for the final compilation. I opened the Module_ Montage=ON ,ITK_ WRAP_ PYTHON=ON and TK_WRAP_rgb_unsigned_short=ON options in CMakeLists.txt, In manylinux-build-wheels.sh, two options ITK_ WRAP_ PYTHON=ON and TK_WRAP_rgb_unsigned_short=ON are turned on (the reason why I didn't turn on the Module_ Montage=ON option is that I found that if I turned on it, an error would be reported when compiling).

cmake.zip

Could you check the contents of these two documents for me? Maybe there are other mistakes?

Thank you very much!

Thank you for contributing an issue!

Welcome to the ITK community!

We are glad you are here and appreciate your contribution. Please keep in mind our community participation guidelines.
Also, please check existing open issues and consider discussion on the ITK Discourse.

It is not clear what you are trying to accomplish. Do you just want to use an ITK build with RGB-US support? Do you want to compile wheels of that, and why? Why do you fiddle with manylinux scripts?

Can you try a clean build? Configure a new build directory with Module_Montage=ON, ITK_WRAP_PYTHON=ON and ITK_WRAP_rgb_unsigned_short=ON. Are there any warnings or errors?

I'm sorry, sir. My description above may not be clear enough.

Please allow me to restate my question:

I want to use ITK-Montage for image stitching. I encountered the problem of not supporting RGB US in the process of using it. Therefore, I want to recompile it and expect to get both ITK and ITK-Montage that support RGB US.

My problem is that I compiled the ITK-5.2.1 version. In order to make the compiled ITK wheel integrate the content of the ITK-Montage, or get an ITK-Montage wheel, I used the Module_Montage=ON and ITK_WRAP_PYTHON=ON options. However, from the compilation results, I only got ITK related files, but not ITK-Montage related files (such as TileMergeImageFilter. py). This shows that only ITK was successfully compiled, but ITK-Montage was not automatically compiled

The compilation methods I use are based on the following page:
https://itkpythonpackage.readthedocs.io/en/latest/Build_ITK_Python_packages.html

3124 is compiled with cmake.exe under Windows, in which two options are added,Module_Montage=ON and ITK_WRAP_PYTHON=ON, so that the final result contains ITK and ITK-Montage, while I compile with cmakelist.txt under Linux, using the same options as 3124(Module_Montage=ON and ITK_WRAP_PYTHON=ON), but the final result only contains ITK but not ITK-Montage

The compilation process did not report an error, but only got the wrong result. So I want to ask you to help me analyze where I might be wrong.

Thank you very much for your reply!

Build_ITK_Python_packages is the more complicated approach, meant for creating Python wheels for redistribution.

The simpler approach is to build ITK with Python and your favorite remote modules locally, then copy WrapITK.pth to your Python's site-packages. More detail is in ITKSoftwareGuide, subsection "Build Python Packages from Source".

A new version of Montage was released today, as part of ITK 5.3.0 release process. I also added a new issue to keep track of the need for RGBUS pixels, InsightSoftwareConsortium/ITKMontage#207.

Build_ITK_Python_packages是更复杂的方法,用于创建用于重新分发的 Python 轮子。

更简单的方法是在本地用 Python 和你最喜欢的远程模块构建 ITK,然后复制WrapITK.pth到你的 Python 的site-packages. 更多细节在ITKSoftwareGuide 中,“从源代码构建 Python 包”小节

Thank you, sir.I will try this method again.

作为 ITK 5.3.0 发布过程的一部分,今天发布了新版本的 Montage。我还添加了一个新问题来跟踪对 RGBUS 像素的需求,InsightSoftwareConsortium/ITKMontage#207

OK, thank you very much! I will try these methods as soon as possible!