PerkLab / PolySeg

Library for polymorph segmentation representation for medical image computing
BSD 2-Clause "Simplified" License
20 stars 4 forks source link

Unable to build shared library DLLs #3

Open 0xzz opened 5 years ago

0xzz commented 5 years ago

@cpinter Is it currently possible to output dynamic library .DLLs and/or with Python wrappers?

By default only a single .lib static library is generated. But I see that there are statements related to exporting dynamic libaries.

if(VTK_WRAP_PYTHON AND BUILD_SHARED_LIBS)

After manually adding these two variables in CMAKE as booleans, it prompts

CMake Error at src/CMakeLists.txt:145 (include): include could not find load file: vtkMacroKitPythonWrap CMake Error at src/CMakeLists.txt:147 (vtkMacroKitPythonWrap): Unknown CMake command "vtkMacroKitPythonWrap".

This required vtkMacroKitPythonWrap.cmake command looks like a part of Slicer. Is there a way of generating the .DLL without involving Slicer? If not possible, how can I adapt this wrapper into PolySeg. I'm happy to do the legwork but need some guidance. Thank you!

0xzz commented 5 years ago

On a side note, if BUILD_SHARED_LIBS is set to TRUE, and VTK_WRAP_PYTHON is set to FALSE, Cmake configure will still attempt to find the vtkMacroKitPythonWrap command. Does the logical AND operator here evaluate to TRUE, somehow? And is it possible to generate a DLL without the Python wrapper?

cpinter commented 5 years ago

I haven't tested individual python wrapping so far. Although this repository is detached from Slicer and can be built separately, some fixes probably still need to be done. I will do it when we decide to use PolySeg as a remote module in Slicer (i.e. use this repo and build in the superbuild), but I'll only do that if there is a serious user who also wants to use PolySeg, but outside Slicer.