KitwareMedical / HASI

High-throughput Applications for Skeletal Imaging
Apache License 2.0
6 stars 8 forks source link

Add Python functions for atlas generation and alignment #55

Closed tbirdso closed 3 years ago

tbirdso commented 3 years ago

Changes in this PR:

Depends on ITKShape PyPi packaging.

Closes #51.

tbirdso commented 3 years ago

Note dependency error is expected while itk-shape PyPi package is pending:

# Verify ITKShape dependency assert(hasattr(itk, 'MeshProcrustesAlignFilter')) E AssertionError

tbirdso commented 3 years ago

Note that we're seeing different behavior across platforms; Python CI on Ubuntu observes a higher final registration convergence metric than on macOS or Windows (local test).

~One thought is that this could have to do with itk::PyVectorContainer wrapping? KdTree requires a PyVectorContainer object for reading out nearest-neighbor results. PyVectorContainer is wrapped for itk.UL or itk.ULL key/values depending on available VectorContainer wrappings by platform, previously observed different wrappings for Ubuntu/Windows tests with Github CI although no behavioral differences otherwise until now.~

Linux testing issue resolved as an issue with getting/setting Vnl vectors as an attempt to copy by reference, workaround instead copies by value. Issue in question is copying points from itk.Mesh to itk.ListSample with a single pass-through so not expected to make a significant performance difference.

tbirdso commented 3 years ago

Added itk-shape dependency from PyPi and squashed fixup commits.

tbirdso commented 3 years ago

Failures in build-linux-python-packages match failures in most recent master branch checks and appear unrelated to this PR which deals solely with Python files (no cxx). Will open an issue to track going forward.