====== ReadImage – Window Arguments ====== A "window" is a 4-number argument that outlines a rectangular region of interest on an image: the x and y position of the upper-left corner, then the width and height of the rectangle, in pixels. x is 0 at the left edge and increases to the right; y is 0 at the top and increases downward. ===== Drawing a window in Show ===== One way to define a window is to display the image in Show and draw a box around the region of interest: hold down the **Shift** key, press the left mouse button, and drag the cursor to the opposite corner. {{ :basic_level:readimage:hoku_basic_readimage_arg_1.png?nolink&400 |Drawing a window on an image in Show}} If you then select the **Save** button in Show, the window coordinates are copied to the system clipboard, and you can paste them into the "window" argument of ReadImage or of another module. Saved windows are also listed in the [[introduction:menubar#windows_menu|Windows menu]]. {{ :basic_level:readimage:hoku_basic_readimage_arg_2.png?nolink&400 |The window coordinates in Show}} ===== Adjusting a window ===== To move the window, press and drag the cursor inside it. You can also edit the four numbers in the window text box and press **Return** or **Enter**. {{ :basic_level:readimage:hoku_basic_readimage_arg_3.png?nolink&400 |Adjusting the window}} ===== Using the window ===== However you get the 4 numbers into the "window" argument, they tell ReadImage to use only the image data in that rectangle. {{ :basic_level:readimage:hoku_basic_readimage_arg_4.png?nolink&400 |The window entered in ReadImage}}