An implant (20) includes a hollow container (24) and a valve (22). The hollow container is configured to be implanted in an organ of a patient, and to contain filling material (50). The valve has first and second position sensors coupled thereto, and is configured to allow passage of the filling material to and from the container, so as to vary a volume of the implant. In the preferred embodiment the valve is configured to allow passage of a syringe (26) therethrough and the sensors are configured to produce signals indicative of their position in a coordinate system of a position tracking system (90).