Guidance on using DisconnectPipeline for filter reuse

Hello, I’d like to use itk.CoocurrenceTextureFeaturesImageFilter using two different parameter settings, one after the other. However I’m failing to execute the proper commands to retrieve the image of the second configuration - i just get the same output as the first set. Here’s my function, which i call twice:

def cooc_filter(my_numpy_array, settings):
    itkImage = itk.GetImageFromArray(my_numpy_array)
    filtr = itk.CoocurrenceTextureFeaturesImageFilter.New(itkImage)
    <configure(settings)>
    filtr.Update()
    result = filtr.GetOutput()
    glcm_maps = itk.GetArrayFromImage(result)
    return glcm_maps

I’ve read about similar issues suggesting the use of result.DisconnectPipeline(), but this doesn’t seem to work. Any tips would be great.

itk                       5.0.1                    pypi_0    pypi
itk-core                  5.0.1                    pypi_0    pypi
itk-filtering             5.0.1                    pypi_0    pypi
itk-io                    5.0.1                    pypi_0    pypi
itk-numerics              5.0.1                    pypi_0    pypi
itk-registration          5.0.1                    pypi_0    pypi
itk-segmentation          5.0.1                    pypi_0    pypi
itk-texturefeatures       3.2.2                    pypi_0    pypi