<div dir="ltr"><div><div>Dear all,<br><br></div>how can I use mouse clicks to create a region of interest (ROI) for image processing without using IPD toolbox?<br><br><br></div>My current aproach is something like this:<br><br><br><br><div><div>1.) display an 2-D array, e.g.: a grayscale image<br><br></div><div>2.) use xclick to get mouse coordinates<br><br></div><div>3.) use xfpoly to draw a mask image based on the points clicked with the mouse<br></div><div> --> mask image has same size as 2D-array in 1.)<br></div><div> --> mask image starts as zeros only<br></div><div> --> xfpoly will fill the polygons white =ROI<br></div><div> --> result is a 2D array containing only "0" and "1" --> can be saved as b/w image<br></div><div><br></div><div>4.) use xs2bmp to save the mask image temporarily<br></div><div><br></div><div>5.) use "ReadImage" from IPD-toolbox to load the temporary image and delete this temporary image afterwards<br><br></div><div>6.) now the mask can be applied onto the original image such as: result_image = input_image .* mask_image;<br><br><br><br></div><div>I'd prefer to get already the position of the area filled by xfpoly in step 3.) as a variable.<br>This would prevent the need of the temporary image and the need of using IPD.<br><br></div><div>Any idea?<br><br></div><div>BR<br></div><div>Philipp<br clear="all"></div><div><div><div><br>-- <br><div class="gmail_signature">There we have the salad.</div>
</div></div></div></div></div>