According to one embodiment, apparatus includes imaging unit, generator, position specifier, direction specifier and angle setter. Imaging unit images object into which a device is inserted, from first and second direction. Generator generates first image data and second image data each corresponding to first and second direction. Position specifier specifies position of the device based on first and second image data. Direction specifier specifies moving direction of the device based on positions of the device specified by position specifier. Angle setter sets first angle corresponding to first direction and second angle corresponding to second direction in accordance with moving direction of the device.