Added image generation excepting SOP Class UID. Changed some variable names.