A method for determining electrode placement layout for use in an electrotherapeutic treatment, comprising: receiving, by a processor of a computer system, a three-dimensional image of a body area of a patient; identifying portions of the image that correspond to abnormal tissue; generating a data set corresponding to the image with the abnormal tissue masked out; retrieving a model template from a memory device of the computer system, wherein the model template specifies positions of a plurality of tissue types in a counterpart body area of a healthy individual; deforming the model template in space so that features in the deformed model template line up with corresponding features in the data set; modifying portions of the deformed model template that correspond to the masked-out portions of the data set so that the modified portions represent the abnormal tissue; generating a model of electrical properties of tissues in the body area based on (a) the positions of the plurality of tissue types in the deformed and modified model template and (b) the position of the abnormal tissue in the deformed and modified model template; determining an electrode placement layout that maximizes or minimizes a target function of an electric field in at least a portion of the abnormal tissue by using the model of electrical properties to simulate electromagnetic field distributions in the body area caused by simulated electrodes placed at a plurality of different sets of candidate positions respective to the body area, and selecting one of the sets; and outputting the determined electrode placement layout for subsequent use as a guide for placing electrodes respective to the body area of the patient. receiving, by a processor of a computer system, a three-dimensional image of a body area of a patient; identifying portions of the image that correspond to abnormal tissue; generating a data set corresponding to the image with the abnormal tissue masked out; retrieving a model template from a memory device of the computer system, wherein the model template specifies positions of a plurality of tissue types in a counterpart body area of a healthy individual; deforming the model template in space so that features in the deformed model template line up with corresponding features in the data set; modifying portions of the deformed model template that correspond to the masked-out portions of the data set so that the modified portions represent the abnormal tissue; generating a model of electrical properties of tissues in the body area based on (a) the positions of the plurality of tissue types in the deformed and modified model template and (b) the position of the abnormal tissue in the deformed and modified model template; determining an electrode placement layout that maximizes or minimizes a target function of an electric field in at least a portion of the abnormal tissue by using the model of electrical properties to simulate electromagnetic field distributions in the body area caused by simulated electrodes placed at a plurality of different sets of candidate positions respective to the body area, and selecting one of the sets; and outputting the determined electrode placement layout for subsequent use as a guide for placing electrodes respective to the body area of the patient.