A trace line is created by manually moving a pointer on an ultrasonic image. When the pointer is traced back along the trace line from a head coordinate, this operation is automatically determined to be a deletion operation and the trace line is partially deleted according to the amount of pointer movement during the operation. In determining the type of operation, the angle formed between the movement vector and a reference vector is compared to an angle threshold.