Python 中具有 ITK 的 PCA

PCA with ITK in Python

我需要在 Python 中使用 ITK 实施 PCA 分析。看了manuel,好像很简单。

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

但是,在Python中,我找不到该函数。应该是这样的

itk.ImagePCAShapeModelEstimator[ImageType, ImageType]

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

ImagePCAShapeModelEstimator 目前没有为 ITK 包装。如果您查看 ITK 存储库内部,则需要一个“.wrap”文件来进行包装。此 class [1] 当前缺少此项。找一个类似class'的wrap文件,然后复制,一般不会太难添加wrap文件。

[1] https://github.com/InsightSoftwareConsortium/ITK/tree/13ff271d953658d192805f6ddc3a15d5ae94a5bd/Modules/Filtering/ImageStatistics/wrapping