A surgical instrument, such as an endoscopic or laparoscopic instrument, includes an ablation device. The ablation device includes an elongate relatively flexible member having a proximal end and a distal end, the flexible member includes at least a first working channel. A first and second electrode extends from a working channel at the distal end of the flexible member. The first and second electrodes are adapted to be endoscopically located in a tissue treatment region. The first and second electrodes are adapted to couple to an electrical waveform generator to receive an irreversible electroporation electrical waveform sufficient to ablate tissue located between the first and second electrodes. The waveform parameters of the irreversible electroporation electrical waveform are determined based on image information received from the tissue treatment region.