This is an independent version of the Slicer MRML library.
The following libraries have been transformed into VTK modules:
- ITKRegistrationFactory
- vktITK
- RemoteIO
- vtkSegmentationCore
- vtkTeem
- MRMLCore/Logic/...
vtkAddon has been added in this repo, but will be removed later or at least transformed into a submodule
Build on Windows for now, see issues.
pip install .ITK build directory root on Windows needs to be at most 50 chars long.
Pip uses temporary directories located in %APPDATA%/Temp/<someid> or similar which exceed this limit.
Temp fix:
- hardcoded ITK build dir in external projects to
C:/itk-build
DLL mangling performed by delvewheel uses the package (wheel) name as a part of the hash used to rename the DLLs. Since the package is name vtk-slicer, the DLLs get mangled with a different name even if their content is actually the same. This seems to generated runtime errors. These errors are unclear, I don't know what's the real issue.
Temp fix:
- Hardcode in
delvewheel/_wheel_repair.pyL.274"vtk".encode()instead ofself._distribution_name.encode().
Since vtk-slicer is installed after VTK, it overrides VTK __init__.py which makes VTK importation impossible.
Temp fix:
- In VTK
__init__.py, add:libs_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir, 'vtk.libs')) if os.path.isdir(libs_dir): os.add_dll_directory(libs_dir)
- And replace
__version__ = _vtk_package.__version__invtk.pywith__version__ = "9.3.0"
See LICENSE file.