SCIInstitute / ShapeWorks

ShapeWorks
http://sciinstitute.github.io/ShapeWorks/
Other
101 stars 32 forks source link

Fix #2151 #2153

Closed akenmorris closed 8 months ago

akenmorris commented 8 months ago

Fix #2151

akenmorris commented 8 months ago

@zahidemon , nevermind, this doesn't work:

2023-10-19T20:02:56.2599980Z 8: Traceback (most recent call last): 2023-10-19T20:02:56.2601170Z 8: File "/Users/runner/work/ShapeWorks/ShapeWorks/Examples/Python/RunUseCase.py", line 89, in <module> 2023-10-19T20:02:56.2602410Z 8: module.Run_Pipeline(args) 2023-10-19T20:02:56.2603600Z 8: File "/Users/runner/work/ShapeWorks/ShapeWorks/Examples/Python/deep_ssm.py", line 408, in Run_Pipeline 2023-10-19T20:02:56.2605290Z 8: itk_translation_transform = DeepSSMUtils.get_image_registration_transform(large_cropped_ref_image_file, 2023-10-19T20:02:56.2607420Z 8: File "/Users/runner/work/ShapeWorks/ShapeWorks/Python/DeepSSMUtilsPackage/DeepSSMUtils/__init__.py", line 53, in get_image_registration_transform 2023-10-19T20:02:56.2609480Z 8: itk_transform = image_utils.get_image_registration_transform(fixed_image_file, moving_image_file, transform_type) 2023-10-19T20:02:56.2611590Z 8: File "/Users/runner/work/ShapeWorks/ShapeWorks/Python/DeepSSMUtilsPackage/DeepSSMUtils/image_utils.py", line 28, in get_image_registration_transform 2023-10-19T20:02:56.2613280Z 8: itk_transform = SimpleITK.TranslationTransform() 2023-10-19T20:02:56.2615080Z 8: File "/usr/local/miniconda/envs/shapeworks/lib/python3.9/site-packages/SimpleITK/SimpleITK.py", line 6597, in __init__ 2023-10-19T20:02:56.2616820Z 8: _SimpleITK.TranslationTransform_swiginit(self, _SimpleITK.new_TranslationTransform(*args)) 2023-10-19T20:02:56.2618510Z 8: TypeError: Wrong number or type of arguments for overloaded function 'new_TranslationTransform'. 2023-10-19T20:02:56.2619690Z 8: Possible C/C++ prototypes are: 2023-10-19T20:02:56.2621140Z 8: itk::simple::TranslationTransform::TranslationTransform(unsigned int,std::vector< double,std::allocator< double > > const &) 2023-10-19T20:02:56.2622870Z 8: itk::simple::TranslationTransform::TranslationTransform(itk::simple::TranslationTransform const &) 2023-10-19T20:02:56.2624760Z 8: itk::simple::TranslationTransform::TranslationTransform(itk::simple::Transform const &)

zahidemon commented 8 months ago

Yes, the translation and and simialrity transform throws errors. Then it's better to keep this function as it was I guess.