The extension of path-independent 2-D phase unwrapping algorithms, based on placement of branch cut lines between phase singularities of opposite sign, was recently proposed for phase volumes in a paper by Huntley. In 3-D, the singularities were shown to form closed loops, and path independence was achieved by placing branch cut surfaces across the loops. In the current work, we describe in detail an optimized and extended version of Huntley’s algorithm. It deals in particular with two aspects that are essential for practical phase volumes: 1. how to close partial loops that pass through arbitrary boundaries separating valid and invalid phase data, and 2. how to select the set of loops having the shortest length. The second algorithm is necessary to deal with ambiguous cases that can arise when the singularities form knots, i.e., two loops pass through a single phase volume element. The performance of the algorithm is demonstrated on 3-D phase maps from two types of medical imaging data: medical resonance imaging (MRI) and x-ray interferometry.