eidelen / DicomToMesh

A command line tool to transform a DICOM volume into a 3d surface mesh (obj, stl or ply). Several mesh processing routines can be enabled, such as mesh reduction, smoothing or cleaning. Works on Linux, OSX and Windows.
MIT License
451 stars 93 forks source link

ccmake build error related to qt5 - macOS Big Sur #34

Closed rezowan099 closed 8 months ago

rezowan099 commented 3 years ago

I have installed vtk 9.0 which has installed qt5 version 5.15.2 as dependency automatically. Now while compiling each time i'm getting the following error

CMake Error at /usr/local/lib/cmake/vtk-9.0/VTK-vtk-module-find-packages.cmake:115 (find_package):
By not providing "FindQt5.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package 
configuration file provided by "Qt5", but CMake did not find one.

Could not find a package configuration file provided by "Qt5" (requested version 5.15) with any of the following names:

Qt5Config.cmake
qt5-config.cmake

Add the installation prefix of "Qt5" to CMAKE_PREFIX_PATH or set "Qt5_DIR" to a directory containing 
one of the above files.  If "Qt5" provides a separate development package or SDK, be sure it has been installed. 
Call Stack (most recent call first): /usr/local/lib/cmake/vtk-9.0/vtk-config.cmake:131 (include)

Please someone suggest how can I solve this issue. Here you can find my CMakeError.log and CMakeOutput.log files CMakeError.log CMakeOutput.log

eidelen commented 2 years ago

Hi, Sorry for not responding. Are you still looking for a solution? First, VTK 9.0 is not running well together with dicom2mesh, respectively some side components which can be enabled. I use VTK 7. Second, Qt is only used when you build the GUI (BUILD_GUI=ON) - is that what you really want?

alxlu commented 2 years ago

I'm having a similar problem. The config option BUILD_GUI isn't available in the cmake UI like it's shown in the README.

EDIT: nvm, figured it out. Have to manually add /opt/homebrew/opt/qt5/lib/cmake/Qt5 in the ccmake config screen.

eidelen commented 2 years ago

That's good to hear that it worked out. I am just wondering, do you really want to use the GUI? This is a very quick (and dirty) implementation, which does not offer all the features. Back in days, I made that for our product managers. There exists much better GUI applications for transforming a DICOM into a mesh - take a look at ITK-SNAP.

alxlu commented 2 years ago

Oh, I didn't want to use the GUI (and didn't use it). It just seems to have qt as a mandatory dependency in order to build on macOS for whatever reason although it's possible I was doing something wrong. But when you install VTK on macOS through homebrew, it seems to also install Qt anyway, so it's not a big deal.

sammcj commented 1 year ago

FYI this is still broken.

eidelen commented 1 year ago

Thank you for the comment. In your case, the cmake error is generated within VTK too? Under OSX, I am building VTK manually. I don't know how the brew version is built. Regarding Qt6 I do not have any experience. Do you want to use it for building the little GUI which comes with Dicom2Mesh? If you are only interested in the commandline tool (as most are), Qt should be not required.