SpatialTransformer setActive

I have a SpatialTranformer that I need to utrn on and off.

I thought the setActive method would be the right thing to look at.

But doing a setActive(false) to stop it doesn't do anything.

So what is the correct way to add and remove a SpatialTransformer ?