@Override
	public String getOffsetValue(CodeUnit cu) {
		Address addr = cu.getAddress();
		Address imagebase = cu.getProgram().getImageBase();
		String text = "";
		if (addr.hasSameAddressSpace(imagebase)) {
			long imagebaseOffset = addr.subtract(cu.getProgram().getImageBase());
			text = String.format(useHex ? "0x%x" : "%d", imagebaseOffset);
			if (showName) {
				text = "imagebase:%s".formatted(text);
			}
		}
		return text;
	}
Creates a new {@link ImagebaseOffsetFieldFactory}

@param model the {@link FieldFormatModel} that the field belongs to
@param hlProvider the {@link ListingHighlightProvider}
@param displayOptions the {@link Options} for display properties
@param fieldOptions the {@link Options} for field specific properties
Ghidra/Features/Base/src/main/java/ghidra/app/util/viewer/field/ImagebaseOffsetFieldFactory.java