我在Python中用ITK实现了PCA分析。在看了手册之后,似乎很容易。

typedef itk::ImagePCAShapeModelEstimator<ImageType,   ImageType >  my_Estimatortype;

但是,在Python中,我找不到函数。应该是
itk.ImagePCAShapeModelEstimator[ImageType, ImageType]

我是否遗漏了什么,或者Python中的ITK库不完整(我使用的是普通的ITK,而不是SimpleITK)

最佳答案

ImagePCAShapeModelEstimator当前未为ITK包装。如果您查看ITK存储库内部,包装需要一个“.wrap”文件。此类[1]当前缺少此项。通过找到类似类的wrap文件并复制它,添加wrap文件通常并不太难。
[1]https://github.com/InsightSoftwareConsortium/ITK/tree/13ff271d953658d192805f6ddc3a15d5ae94a5bd/Modules/Filtering/ImageStatistics/wrapping

关于python - PCA和ITK in Python,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/36308501/

10-09 22:33