An excretory organ in which wastes are filtered from the blood.