1. A method for medical image processing using a nonlinear recursive filter, comprising: creating one or more look-up tables based on a mathematical pulse model; sampling a baseline signal at a first predetermined sampling rate to extract two or more consecutive baseline samples; determining a baseline value based on the two or more consecutive baseline samples; receiving an input signal from a medical imaging system including two or more pulses; subtracting the baseline value from the input signal to form a baseline corrected input signal; sampling the baseline corrected input signal at a second predetermined sampling rate to extract two or more consecutive samples within a first pulse of the baseline corrected input signal; comparing the two or more consecutive samples within the first pulse of the baseline corrected input signal with information stored in the one or more look-up tables to determine the maximum magnitude of the first pulse; sampling the baseline corrected input signal at the second predetermined sampling rate to extract two or more consecutive samples within a second pulse of the baseline corrected input signal, wherein the second pulse of the baseline corrected input signal is temporally subsequent to and at least partially temporally overlaps with the first pulse of the baseline corrected input signal; predicting at least two tail magnitudes of the first pulse of the baseline corrected input signal; subtracting the at least two tail magnitudes of the first pulse of the baseline corrected input signal from the temporally corresponding two or more consecutive samples within the second pulse of the baseline corrected input signal to correct the two or more consecutive samples within the second pulse of the baseline corrected input signal for pileup resulting from the first pulse of the baseline corrected input signal; and comparing the two or more consecutive samples within the second pulse of the baseline corrected input signal with information stored in the one or more look-up tables to determine the maximum magnitude of the second pulse.