Large Image Viewer (2007)

Year: 2007

The Problem

When we open an image using the CxImage class (Open source image library) in the PAM (An Image modeler application) implementation, the whole image is loaded in the main memory (RAM). If the image size is larger than the main memory or equally large, it occupies much of the RAM space leading to a condition where the system hangs and does not respond to the user interactions actively.

The Solution

To avoid such a condition, the present implementation uses tiling concept (which also includes pixel skipping for lower resolution) where the area shown on the screen is only loaded in the main memory (max 5 MB), rest of the image is maintained in the secondary memory (can be >1GB) and retrieved when only that area is required.

The Process – Conversion

Any tif image can be converted into .asc (data file) and .hdr (header file) using the Conversion module given in the project. This is done for easy access of data using a file pointer (using random file read and write operation)

The Process – Open

The .asc & .hdr file are read and initialization is done. Histogram is computed using the values retrieved from the .asc files. Retrieve Necessary Data from .asc file and show that image in the picture area. Initialize the scroll bars and Update the status window

Large Image Viewer - Main Window

The window has the following main regions Picture area, Histogram frame, Controls frame, Clip Region frame. Picture area will show the image, it has vertical and horizontal scroll bars for moving to various parts of the image

Figure : Large Image Viewer

Histogram

Histogram bar chart is given for the three bands/colors (RGB). One can switch the combinations (using the checkbox) of R G B to check the histogram pattern either individually or altogether. The Y axis shows the count of the values found in the pixels of the image

Controls

( + ) is used to Zoom In, i.e. to see the image much more closer and clearer. ( - ) is used to Zoom Out, i.e. to see the image from a farther point of view. 1:1 shows the image in its actual size. ‘OPEN’ is used to open the file (.asc & .hdr) to load in the picture frame. ‘CONVERT’ will start the conversion module

Clip Region

Specify the lower left and upper right co-ordinates and click the button ‘CLIP & SAVE’. It will ask for a file name and the image is clipped and stored in that file name

Status & Co-ordinates

The program status is shown below the picture area in the Viewer Window, it can be in either of the following states: Done, Loading…, Computing Histogram Values.., Open Large Image…, clipping Region…. The x and y co-ordinates of the cursor is shown in the Viewer Window