Original processing code from CT to display data