public AddressSet getAddressSet(FieldSelection sel) {
		AddressSet addrSet = new AddressSet();
		int n = sel.getNumRanges();
		for (int i = 0; i < n; i++) {
			FieldRange range = sel.getFieldRange(i);
			FieldLocation end = range.getEnd();
			BigInteger endIndex = end.getIndex();
			if (end.getFieldNum() == 0 && end.getRow() == 0 && end.getCol() == 0) {
				endIndex = endIndex.subtract(BigInteger.ONE);
			}
			addToAddressSet(addrSet, range.getStart().getIndex(), endIndex);
		}
		return addrSet;
	}
Returns the Address set corresponding to the set of indexes

@param sel the FieldSelection containing the set of indexes to include.
@return the AddressSet for the given field selection.
Ghidra/Features/Base/src/main/java/ghidra/app/util/viewer/util/AddressIndexMap.java