changed segemented image generation to reflect less than or equal to zero part