Print ITK Python Module Loading#
Synopsis#
Print how ITK Python module dependencies are lazily loaded.
Results#
Output:
Loading ITKPyBase... done
Loading ITKCommon... done
Loading ITKStatistics... done
Loading ITKImageFilterBase... done
Loading ITKTransform... done
Loading ITKImageFunction... done
Loading ITKImageGrid... done
Loading ITKFFT... done
Loading ITKPyUtils... done
Code#
Python#
#!/usr/bin/env python
### Print ITK Module Loading
# It can be useful to see how ITK modules are being loaded in order
# to understand module dependencies. `itk.auto_progress` can be used
# to increase verbosity of module loading and filter printouts.
import itk
# Enable module loading printouts
itk.auto_progress(2)
# Load a filter from a module with several dependencies
_ = itk.ForwardFFTImageFilter.values()[0].New()
# Disable printouts
itk.auto_progress(0)
# Do work