1460506774-68f0bcf1-ca31-4246-a315-fb63095be719

In the present invention, a reference block data within a current image from which a motion vector will be obtained and corresponding search region data within reproduced previous image are stored in a reference block and a search region data memory, respectively. The apparatus includes means for detecting AF in a heart of a patient, means for classifying the AF as one of a plurality of AF types, means for selecting a therapy for delivery to the heart, from a plurality of therapies, based on AF type, and means for delivering the selected therapy to the heart. The waveform generator includes a memory control circuit and an address generation circuit. A local size of the tubular structure is derived at the three-dimensional spatial position of the centre point of the tubular structure from said projected edges and the predetermined projection directions.