# Guidance on using DisconnectPipeline for filter reuse

**URL:** https://discourse.itk.org/t/guidance-on-using-disconnectpipeline-for-filter-reuse/2702
**Category:** Beginner Questions
**Tags:** python
**Created:** [February 11, 2020, 4:27am UTC](https://discourse.itk.org/t/guidance-on-using-disconnectpipeline-for-filter-reuse/2702 "2020-02-11T04:27:32Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![kyochujoho](https://discourse.itk.org/letter_avatar_proxy/v4/letter/k/9fc29f/32.png) [@kyochujoho](https://discourse.itk.org/u/kyochujoho)
#### Post date: [February 11, 2020, 4:27am UTC](https://discourse.itk.org/t/guidance-on-using-disconnectpipeline-for-filter-reuse/2702/1 "2020-02-11T04:27:32Z")

</div>

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:

```auto
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.

```nohighlight
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

```
