Hello,
I created a Python virtual environment and ran these commands:
pip install itk
pip install itk-montage
However, when I try to create a TileMontage in my code
import itk
montage = itk.TileMontage.New()
it fails with the following error:
Exception has occurred: AttributeError
module 'itk' has no attribute 'TileMontage'
I then decided to run dir(itk)
to see what all is available, and TileMontage isn’t in the list. Neither is MedianImageFilter, which is another filter I wanted to use.
However, if I run the commands to try installing the itk and itk-montage modules again, I get this output:
(pyIFAM) Blackbird:pyIFAM joeykleingers$ pip install itk
Requirement already satisfied: itk in /Users/joeykleingers/.conda/envs/pyIFAM/lib/python3.8/site-packages/itk-5.2rc1-py3.8-macosx-10.9-x86_64.egg (5.2rc1)
Requirement already satisfied: itk-core==5.2rc1 in /Users/joeykleingers/.conda/envs/pyIFAM/lib/python3.8/site-packages/itk_core-5.2rc1-py3.8-macosx-10.9-x86_64.egg (from itk) (5.2rc1)
Requirement already satisfied: itk-filtering==5.2rc1 in /Users/joeykleingers/.conda/envs/pyIFAM/lib/python3.8/site-packages/itk_filtering-5.2rc1-py3.8-macosx-10.9-x86_64.egg (from itk) (5.2rc1)
Requirement already satisfied: itk-io==5.2rc1 in /Users/joeykleingers/.conda/envs/pyIFAM/lib/python3.8/site-packages/itk_io-5.2rc1-py3.8-macosx-10.9-x86_64.egg (from itk) (5.2rc1)
Requirement already satisfied: itk-numerics==5.2rc1 in /Users/joeykleingers/.conda/envs/pyIFAM/lib/python3.8/site-packages/itk_numerics-5.2rc1-py3.8-macosx-10.9-x86_64.egg (from itk) (5.2rc1)
Requirement already satisfied: itk-registration==5.2rc1 in /Users/joeykleingers/.conda/envs/pyIFAM/lib/python3.8/site-packages/itk_registration-5.2rc1-py3.8-macosx-10.9-x86_64.egg (from itk) (5.2rc1)
Requirement already satisfied: itk-segmentation==5.2rc1 in /Users/joeykleingers/.conda/envs/pyIFAM/lib/python3.8/site-packages/itk_segmentation-5.2rc1-py3.8-macosx-10.9-x86_64.egg (from itk) (5.2rc1)
Requirement already satisfied: numpy in /Users/joeykleingers/.conda/envs/pyIFAM/lib/python3.8/site-packages/numpy-1.20.1-py3.8-macosx-10.9-x86_64.egg (from itk) (1.20.1)
(pyIFAM) Blackbird:pyIFAM joeykleingers$ pip install itk-montage
Requirement already satisfied: itk-montage in /Users/joeykleingers/.conda/envs/pyIFAM/lib/python3.8/site-packages/itk_montage-0.7.0-py3.8-macosx-10.9-x86_64.egg (0.7.0)
Requirement already satisfied: itk-core>=v5.1.1 in /Users/joeykleingers/.conda/envs/pyIFAM/lib/python3.8/site-packages/itk_core-5.2rc1-py3.8-macosx-10.9-x86_64.egg (from itk-montage) (5.2rc1)
Requirement already satisfied: itk-filtering>=v5.1.1 in /Users/joeykleingers/.conda/envs/pyIFAM/lib/python3.8/site-packages/itk_filtering-5.2rc1-py3.8-macosx-10.9-x86_64.egg (from itk-montage) (5.2rc1)
Requirement already satisfied: itk-io>=v5.1.1 in /Users/joeykleingers/.conda/envs/pyIFAM/lib/python3.8/site-packages/itk_io-5.2rc1-py3.8-macosx-10.9-x86_64.egg (from itk-montage) (5.2rc1)
Requirement already satisfied: numpy in /Users/joeykleingers/.conda/envs/pyIFAM/lib/python3.8/site-packages/numpy-1.20.1-py3.8-macosx-10.9-x86_64.egg (from itk-montage) (1.20.1)
Requirement already satisfied: itk-numerics==5.2rc1 in /Users/joeykleingers/.conda/envs/pyIFAM/lib/python3.8/site-packages/itk_numerics-5.2rc1-py3.8-macosx-10.9-x86_64.egg (from itk-filtering>=v5.1.1->itk-montage) (5.2rc1)
How do I use the montaging classes in my Python code? What am I missing?