Is there anyway I can remove the oil cooler without keeping those metal lines?

I tried to remove it before but when I did there was no place to screw in the filter.

Is there sometype of adapter or something I could use?

Thanks in Advance,
Jay