A medical device for examination or treatment based on a reference point A1, including: a virtual endoscopic image generation section 12 configured to generate a virtual endoscopic image from a plurality of different sight line positions using three-dimensional image data of a bronchus 9 that is obtained in advance an image retrieving section 11 configured to retrieve a virtual endoscopic image highly similar to a real image a reference-point setting section 15 configured to set the reference point A1 based on a line-of-sight position A0 of the highly similar virtual endoscopic image a relative-position calculation section 16 configured to calculate a relative position of a treatment instrument 4 to the reference point A1 a movement detection section 24 configured to detect a movement of the reference point A1 or the bronchus and a position correction section 25 configured to correct the relative position in response to the movement of the reference point A1 or the bronchus.