KdTree Python

There’s a way to implement itk::Statistics::WeightedCentroidKdTreeGenerator and itk::Statistics::KdTreeBasedKmeansEstimator in python?

EDIT: i’m trying also to use itk::SmoothingRecursiveGaussianImageFilter but it seems that is not included in the itk library in python.

import itk
ImageType=itk.Image[itk.F,3]
smooth=itk.SmoothingRecursiveGaussianImageFilter[ImageType,Imagetype].New()
AttributeError: module ‘itk’ has no attribute ‘SmoothingRecursiveGaussianImageFilter’

Yes – please review this patch.

This worked for me – what version of ITK are you using?

I’m using ITK 5.1b1 on Conda (jupyther) installed on Windows 10

Cattura

EDIT: I will try to downgrade and i will update you

@franca great, thanks for the information.

ITK 5.1 RC 1 will be coming out soon; it addresses issue identified in 5.0b1 and adds the k-d tree wrapping – we can try that.