A system for resecting a tissue mass , the system comprising: a surgical instrument ; a first sensor for measuring a first signal, the first sensor dimensioned to fit at least one of inside and next to the tissue mass , wherein the first signal indicates a position and an orientation of the tissue mass relative to the surgical instrument in real time; a second sensor for measuring a second signal, the second sensor coupled to the surgical instrument , wherein the second signal indicates a position and an orientation of the surgical instrument relative to the tissue mass ; a controller in communication with the first sensor and the second sensor ; and wherein the controller is further configured to measure patient specific properties of the tissue mass and the surrounding tissue using a medical image acquired from one of a computed tomography (CT), magnetic resonance imaging (MRI), or fluoroscopic imaging system for use with a deformation algorithm to predict deformations to the tissue mass that occur during an operation for a patient, and wherein the controller calculates a distance between the first sensor and the second sensor based on the first signal and the second signal and implements the deformation algorithm that estimates or models changes occurring to a resection margin during operation of the surgical instrument as a result of the deformations of the tissue mass , the resection margin having a predetermined distance (D 2 ) surrounding the tissue mass and being determined by creating a three dimensional envelope around the tissue mass , wherein the predetermined distance (D 2 ) is used to define a threshold value such that when the surgical instrument is in a position less than the threshold value auditory, visual and/or haptic feedback is produced by the controller to be provided to a surgeon. a surgical instrument ; a first sensor for measuring a first signal, the first sensor dimensioned to fit at least one of inside and next to the tissue mass , wherein the first signal indicates a position and an orientation of the tissue mass relative to the surgical instrument in real time; a second sensor for measuring a second signal, the second sensor coupled to the surgical instrument , wherein the second signal indicates a position and an orientation of the surgical instrument relative to the tissue mass ; a controller in communication with the first sensor and the second sensor ; and wherein the controller is further configured to measure patient specific properties of the tissue mass and the surrounding tissue using a medical image acquired from one of a computed tomography (CT), magnetic resonance imaging (MRI), or fluoroscopic imaging system for use with a deformation algorithm to predict deformations to the tissue mass that occur during an operation for a patient, and wherein the controller calculates a distance between the first sensor and the second sensor based on the first signal and the second signal and implements the deformation algorithm that estimates or models changes occurring to a resection margin during operation of the surgical instrument as a result of the deformations of the tissue mass , the resection margin having a predetermined distance (D 2 ) surrounding the tissue mass and being determined by creating a three dimensional envelope around the tissue mass , wherein the predetermined distance (D 2 ) is used to define a threshold value such that when the surgical instrument is in a position less than the threshold value auditory, visual and/or haptic feedback is produced by the controller to be provided to a surgeon. <EOS>