1. A system for image segmentation comprising: one or more computing devices; an imaging unit, wherein the imaging unit comprises at least a computer processor which, when executed, performs a method, the method comprising: acquiring an N-dimensional digital image, said image comprising a plurality of data items associated with an N-dimensional domain of points; constructing a graph from the N-dimensional digital image, wherein each point of said image is associated with a vertex of said graph and said graph includes an edge connecting each pair of vertices corresponding to adjacent points in said image; calculating a plurality of cost functions, wherein each calculated cost function of the plurality of cost functions is related to each identified edge; constructing an electrical network based upon the constructed graph and the plurality of calculated cost functions, wherein one or more points in the graph are connected to a source node and one or more points in the graph are connected to a sink node; simulating the electrical network to estimate a minimum-weight s-t cut; and segmenting the N-dimensional digital image based upon the simulating to produce segmented layers.