#
# HELP: SYNOPSIS:
# HELP:     generic/convert/makeunsigned
# HELP:
# HELP: DESCRIPTION:
# HELP:     Make loaded data unsigned if the dicom was signed. This is
# HELP:     detected by checking Dicom/(0028,0103)PixelRepresentation == 1.
# HELP:     Set that property to 0, then.
#
{ DOIT ${((int)$root.func.eccet.meta.get("Dicom/(0028,0103)*"))==1}
	! generic/convert/greyshift 32768
	CECHO ${$root.func.eccet.meta.set("Dicom/(0028,0103)*","0")}
	CECHO ${$root.func.eccet.meta.set("Dicom/(0028,0103)PixelRepresentation","0")}
} DOIT 0 0
