reworking image registration and density generation