Python code model-to-model distance

Hello everyone,
Does anyone know where to find the underlying python code of the model-to-model distance module? I want to automate these parameters:

’ Source model: prostate
Target model: tumor
Vtkoutputfile: create new model as ‘whole_dist_pt’
Distance: signed_closest_point
Apply’

I have to do this for 6 models, so it would be really convenient if I can just copy the python script instead of manually clicking every time.

Many thanks in advance,

Kind regards,
Judith

The C++ source code for the model-to-model distance module is here.

It uses the vtkDistancePolyDataFilter which also has a Python wrapper. I have a Python module that uses this filter here which may help as an example.

1 Like