<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/170871</link>
    <title>MATLAB Central Newsreader - Any way to speed up drawing of tiny patch object?</title>
    <description>Feed for thread: Any way to speed up drawing of tiny patch object?</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2012 by MathWorks, Inc.</copyright>
    <webmaster>webmaster@mathworks.com</webmaster>
    <generator>MATLAB Central Newsreader</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <ttl>60</ttl>
    <image>
      <title>MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Thu, 12 Jun 2008 21:27:18 -0400</pubDate>
      <title>Any way to speed up drawing of tiny patch object?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/170871#437213</link>
      <author>Chris P.</author>
      <description>Hey.&lt;br&gt;
&lt;br&gt;
I'm creating a program in MATLAB where a grid is drawn on a&lt;br&gt;
histological image and a pathologist will click within certain grid&lt;br&gt;
cells based on the features appearing within the cell.&lt;br&gt;
&lt;br&gt;
I have the entire thing finished but am looking for an optimization.&lt;br&gt;
I decided to draw a translucent patch object (in this case, a square)&lt;br&gt;
on top of any cell which is clicked.  The time taken to draw square&lt;br&gt;
between &quot;clicking on a cell&quot; and &quot;being ready to click on another&lt;br&gt;
cell&quot; is more than one second -- and I'd like it to be faster (i.e.&lt;br&gt;
appearing to be &quot;instantaneous&quot;) since a pathologist's time is&lt;br&gt;
precious, as it is (note that our dataset includes hundreds of images&lt;br&gt;
which will be split into 48 cells, each).  Here's the snippet of the&lt;br&gt;
code used to generate the patch:&lt;br&gt;
&lt;br&gt;
% Earlier in the program...&lt;br&gt;
p_facecolour = [0 1 0]; p_facealpha = 0.2;&lt;br&gt;
&lt;br&gt;
% p_x1, p_y1, p_x2, p_y2 are calculated based on [x,y] returned from&lt;br&gt;
ginput(1).&lt;br&gt;
x = [p_x1 p_x1 p_x2 p_x2];&lt;br&gt;
y = [p_y1 p_y2 p_y2 p_y1];&lt;br&gt;
h_patch_array(row_select, col_select) = ...&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;patch(x, y, p_facecolour, ...&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;'FaceAlpha', p_facealpha);&lt;br&gt;
&lt;br&gt;
(NB: I save the handle into an array so that I can turn the&lt;br&gt;
Visiblility of the square on and off, if required.)&lt;br&gt;
Is it just the case that it takes &amp;gt; 1 second to draw a patch,&lt;br&gt;
regardless of size?  I tried some of the tips at &lt;a href=&quot;http://preview.tinyurl.com/43pj3u&quot;&gt;http://preview.tinyurl.com/43pj3u&lt;/a&gt;&lt;br&gt;
but they didn't seem to make a difference.  I don't know if this&lt;br&gt;
request seems ridiculous, but I wanted to be sure that I'm not missing&lt;br&gt;
anything obvious.&lt;br&gt;
&lt;br&gt;
Thanks for any help you can give, either to speed this up or with a&lt;br&gt;
suggestion about another way to go about this.&lt;br&gt;
&lt;br&gt;
- Chris</description>
    </item>
    <item>
      <pubDate>Thu, 12 Jun 2008 21:52:01 -0400</pubDate>
      <title>Re: Any way to speed up drawing of tiny patch object?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/170871#437214</link>
      <author>Scott Burnside</author>
      <description>&quot;Chris P.&quot; &amp;lt;chris.peressotti@gmail.com&amp;gt; wrote in message &lt;br&gt;
&amp;lt;c99b0c35-4eca-4087-981d-&lt;br&gt;
ac5489bd7849@p25g2000hsf.googlegroups.com&amp;gt;...&lt;br&gt;
&amp;gt; Hey.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I'm creating a program in MATLAB where a grid is drawn &lt;br&gt;
on a&lt;br&gt;
&amp;gt; histological image and a pathologist will click within &lt;br&gt;
certain grid&lt;br&gt;
&amp;gt; cells based on the features appearing within the cell.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I have the entire thing finished but am looking for an &lt;br&gt;
optimization.&lt;br&gt;
&amp;gt; I decided to draw a translucent patch object (in this &lt;br&gt;
case, a square)&lt;br&gt;
&amp;gt; on top of any cell which is clicked.  The time taken to &lt;br&gt;
draw square&lt;br&gt;
&amp;gt; between &quot;clicking on a cell&quot; and &quot;being ready to click &lt;br&gt;
on another&lt;br&gt;
&amp;gt; cell&quot; is more than one second -- and I'd like it to be &lt;br&gt;
faster (i.e.&lt;br&gt;
&amp;gt; appearing to be &quot;instantaneous&quot;) since a pathologist's &lt;br&gt;
time is&lt;br&gt;
&amp;gt; precious, as it is (note that our dataset includes &lt;br&gt;
hundreds of images&lt;br&gt;
&amp;gt; which will be split into 48 cells, each).  Here's the &lt;br&gt;
snippet of the&lt;br&gt;
&amp;gt; code used to generate the patch:&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; % Earlier in the program...&lt;br&gt;
&amp;gt; p_facecolour = [0 1 0]; p_facealpha = 0.2;&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; % p_x1, p_y1, p_x2, p_y2 are calculated based on [x,y] &lt;br&gt;
returned from&lt;br&gt;
&amp;gt; ginput(1).&lt;br&gt;
&amp;gt; x = [p_x1 p_x1 p_x2 p_x2];&lt;br&gt;
&amp;gt; y = [p_y1 p_y2 p_y2 p_y1];&lt;br&gt;
&amp;gt; h_patch_array(row_select, col_select) = ...&lt;br&gt;
&amp;gt;    patch(x, y, p_facecolour, ...&lt;br&gt;
&amp;gt;    'FaceAlpha', p_facealpha);&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; (NB: I save the handle into an array so that I can turn &lt;br&gt;
the&lt;br&gt;
&amp;gt; Visiblility of the square on and off, if required.)&lt;br&gt;
&amp;gt; Is it just the case that it takes &amp;gt; 1 second to draw a &lt;br&gt;
patch,&lt;br&gt;
&amp;gt; regardless of size?  I tried some of the tips at &lt;br&gt;
&lt;a href=&quot;http://preview.tinyurl.com/43pj3u&quot;&gt;http://preview.tinyurl.com/43pj3u&lt;/a&gt;&lt;br&gt;
&amp;gt; but they didn't seem to make a difference.  I don't know &lt;br&gt;
if this&lt;br&gt;
&amp;gt; request seems ridiculous, but I wanted to be sure that &lt;br&gt;
I'm not missing&lt;br&gt;
&amp;gt; anything obvious.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Thanks for any help you can give, either to speed this &lt;br&gt;
up or with a&lt;br&gt;
&amp;gt; suggestion about another way to go about this.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; - Chris&lt;br&gt;
&lt;br&gt;
Chris,&lt;br&gt;
There are several ways to specify patches. The &lt;br&gt;
documentation is not the greatest. One way is to specify &lt;br&gt;
the faces and vertices. This example is 3D but applies:&lt;br&gt;
&lt;br&gt;
% patch experiment&lt;br&gt;
x = [0    -0.08  0.08];&lt;br&gt;
y = [1.02  1.02  1.02];&lt;br&gt;
z = [1     1.19  1.19];&lt;br&gt;
vert = [x(1) y(1) z(1); x(2) y(2) z(2); x(3) y(3) z(3)];&lt;br&gt;
faces = [1 2 3];&lt;br&gt;
fp = patch('Faces',faces,'Vertices',vert,...&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'FaceColor',[1 0 0],'EdgeColor',[1 1 1]);&lt;br&gt;
hold on&lt;br&gt;
&lt;br&gt;
This might render quicker. When I get home I'll tic/toc a &lt;br&gt;
couple different methods and post the render times to this &lt;br&gt;
thread. I need this information as well.&lt;br&gt;
&lt;br&gt;
Back in a few hours,&lt;br&gt;
Scott</description>
    </item>
    <item>
      <pubDate>Thu, 12 Jun 2008 21:55:03 -0400</pubDate>
      <title>Re: Any way to speed up drawing of tiny patch object?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/170871#437215</link>
      <author>Kenneth Eaton</author>
      <description>&quot;Chris P.&quot; &amp;lt;chris.peressotti@gmail.com&amp;gt; wrote in message &lt;br&gt;
&amp;lt;c99b0c35-4eca-4087-981d-&lt;br&gt;
ac5489bd7849@p25g2000hsf.googlegroups.com&amp;gt;...&lt;br&gt;
&amp;gt; Hey.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I'm creating a program in MATLAB where a grid is drawn on &lt;br&gt;
a&lt;br&gt;
&amp;gt; histological image and a pathologist will click within &lt;br&gt;
certain grid&lt;br&gt;
&amp;gt; cells based on the features appearing within the cell.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I have the entire thing finished but am looking for an &lt;br&gt;
optimization.&lt;br&gt;
&amp;gt; I decided to draw a translucent patch object (in this &lt;br&gt;
case, a square)&lt;br&gt;
&amp;gt; on top of any cell which is clicked.  The time taken to &lt;br&gt;
draw square&lt;br&gt;
&amp;gt; between &quot;clicking on a cell&quot; and &quot;being ready to click on &lt;br&gt;
another&lt;br&gt;
&amp;gt; cell&quot; is more than one second -- and I'd like it to be &lt;br&gt;
faster (i.e.&lt;br&gt;
&amp;gt; appearing to be &quot;instantaneous&quot;) since a pathologist's &lt;br&gt;
time is&lt;br&gt;
&amp;gt; precious, as it is (note that our dataset includes &lt;br&gt;
hundreds of images&lt;br&gt;
&amp;gt; which will be split into 48 cells, each).  Here's the &lt;br&gt;
snippet of the&lt;br&gt;
&amp;gt; code used to generate the patch:&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; % Earlier in the program...&lt;br&gt;
&amp;gt; p_facecolour = [0 1 0]; p_facealpha = 0.2;&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; % p_x1, p_y1, p_x2, p_y2 are calculated based on [x,y] &lt;br&gt;
returned from&lt;br&gt;
&amp;gt; ginput(1).&lt;br&gt;
&amp;gt; x = [p_x1 p_x1 p_x2 p_x2];&lt;br&gt;
&amp;gt; y = [p_y1 p_y2 p_y2 p_y1];&lt;br&gt;
&amp;gt; h_patch_array(row_select, col_select) = ...&lt;br&gt;
&amp;gt;    patch(x, y, p_facecolour, ...&lt;br&gt;
&amp;gt;    'FaceAlpha', p_facealpha);&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; (NB: I save the handle into an array so that I can turn &lt;br&gt;
the&lt;br&gt;
&amp;gt; Visiblility of the square on and off, if required.)&lt;br&gt;
&amp;gt; Is it just the case that it takes &amp;gt; 1 second to draw a &lt;br&gt;
patch,&lt;br&gt;
&amp;gt; regardless of size?  I tried some of the tips at &lt;br&gt;
&lt;a href=&quot;http://preview.tinyurl.com/43pj3u&quot;&gt;http://preview.tinyurl.com/43pj3u&lt;/a&gt;&lt;br&gt;
&amp;gt; but they didn't seem to make a difference.  I don't know &lt;br&gt;
if this&lt;br&gt;
&amp;gt; request seems ridiculous, but I wanted to be sure that &lt;br&gt;
I'm not missing&lt;br&gt;
&amp;gt; anything obvious.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Thanks for any help you can give, either to speed this up &lt;br&gt;
or with a&lt;br&gt;
&amp;gt; suggestion about another way to go about this.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; - Chris&lt;br&gt;
&lt;br&gt;
The transparency may be what is taking so much &lt;br&gt;
computational effort. Try with solid-colored patches... you &lt;br&gt;
will probably see a significant speed-up. The transparent &lt;br&gt;
patches may look nicer, but I've noticed that adding &lt;br&gt;
transparent objects or modifiying the transparency of an &lt;br&gt;
object can sometimes be slow.&lt;br&gt;
&lt;br&gt;
Ken</description>
    </item>
    <item>
      <pubDate>Thu, 12 Jun 2008 22:03:01 -0400</pubDate>
      <title>Re: Any way to speed up drawing of tiny patch object?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/170871#437216</link>
      <author>Kenneth Eaton</author>
      <description>Additionally, if you still want to mimic the appearance of &lt;br&gt;
a transparent patch, without transparency, you could &lt;br&gt;
probably make the face color of the patch the average of &lt;br&gt;
the image voxel below it and a highlight color. In other &lt;br&gt;
words, if the voxel color is an RGB vector ([r g b]), and &lt;br&gt;
you want a red highlight ([1 0 0]), then make the patch &lt;br&gt;
face color [(r+1)/2 g/2 b/2]. Just a thought...&lt;br&gt;
&lt;br&gt;
Ken</description>
    </item>
    <item>
      <pubDate>Fri, 13 Jun 2008 15:03:09 -0400</pubDate>
      <title>Re: Any way to speed up drawing of tiny patch object?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/170871#437316</link>
      <author>Chris P.</author>
      <description>&amp;gt; There are several ways to specify patches. The&lt;br&gt;
&amp;gt; documentation is not the greatest. One way is to specify&lt;br&gt;
&amp;gt; the faces and vertices.&lt;br&gt;
&lt;br&gt;
I'd seen that (and figured out how it would be done) but didn't&lt;br&gt;
explore it since it seemed to imply that it's faster only for a patch&lt;br&gt;
with many faces... however, I decided to do my own tic-tocing and drew&lt;br&gt;
the patch twice for each click -- once by giving the vertices directly&lt;br&gt;
to patch (I call this &quot;(x,y)&quot;, below), and once by creating vertices/&lt;br&gt;
faces matrices and sending those to patch (&quot;(v,f)&quot;, below).  I did ten&lt;br&gt;
measurements (just listing a few, below):&lt;br&gt;
&lt;br&gt;
(x,y)	        (v,f)	        (v,f)/(x,y)&lt;br&gt;
0.000802	0.000359	0.45&lt;br&gt;
0.000809	0.000509	0.63&lt;br&gt;
...             ...             ...&lt;br&gt;
0.000965	0.00037	        0.38&lt;br&gt;
0.000972	0.000458	0.47&lt;br&gt;
&lt;br&gt;
The avg of the last column is .48, so (v,f) takes approximately half&lt;br&gt;
the time.  This is academically interesting, but... these numbers show&lt;br&gt;
me that it really ISN'T patch that's causing the problem!  According&lt;br&gt;
to these numbers, it's taking less than 1 ms to draw the patch, and&lt;br&gt;
the pathologist won't notice the difference between 1 ms and 0.5 ms.&lt;br&gt;
&lt;br&gt;
I'm picking these points within a &quot;while&quot; loop, so I placed my tic-toc&lt;br&gt;
around the ginput statement such that &quot;toc&quot; would be a measure of the&lt;br&gt;
entire time taken between picking a point, processing the result,&lt;br&gt;
drawing the patch, and being ready to pick the next point:&lt;br&gt;
fprintf('%2.2f seconds from ginput-to-ginput\n', toc);&lt;br&gt;
[ginput_x,ginput_y,ginput_button] = ginput(1);&lt;br&gt;
tic&lt;br&gt;
&lt;br&gt;
and these times resulted:&lt;br&gt;
0.000818 seconds from ginput-to-ginput&lt;br&gt;
0.000778 seconds from ginput-to-ginput&lt;br&gt;
0.000783 seconds from ginput-to-ginput&lt;br&gt;
&lt;br&gt;
Again, WTF?  These are &amp;lt; 1 ms!  So I then rearranged my tic-toc like&lt;br&gt;
so, and made sure I was ready to click the next next as soon as I saw&lt;br&gt;
the crosshairs for ginput appear:&lt;br&gt;
[ginput_x,ginput_y,ginput_button] = ginput(1);&lt;br&gt;
fprintf('%2.2f seconds from ginput-to-AFTER-ginput\n', toc);&lt;br&gt;
tic&lt;br&gt;
&lt;br&gt;
and these times resulted:&lt;br&gt;
1.38 seconds from ginput-to-AFTER-ginput&lt;br&gt;
1.36 seconds from ginput-to-AFTER-ginput&lt;br&gt;
1.35 seconds from ginput-to-AFTER-ginput&lt;br&gt;
&lt;br&gt;
SO, the problem is somewhere in ginput itself, yes?  Does anyone have&lt;br&gt;
any ideas?  (I'm going to go through ginput with a fine-toothed comb&lt;br&gt;
right now, but I thought I'd give this update in case anyone has a&lt;br&gt;
quick answer.)&lt;br&gt;
&lt;br&gt;
Thanks for your help so far,&lt;br&gt;
&lt;br&gt;
- Chris</description>
    </item>
    <item>
      <pubDate>Fri, 13 Jun 2008 15:44:42 -0400</pubDate>
      <title>Re: Any way to speed up drawing of tiny patch object?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/170871#437326</link>
      <author>Chris P.</author>
      <description>&amp;gt; SO, the problem is somewhere in ginput itself, yes?  Does anyone have any ideas?&lt;br&gt;
&amp;gt; (I'm going to go through ginput with a fine-toothed comb&lt;br&gt;
&amp;gt; right now, but I thought I'd give this update in case anyone has a&lt;br&gt;
&amp;gt; quick answer.)&lt;br&gt;
&lt;br&gt;
So I've traced the problem to a call to &quot;waitforbuttonpress&quot;, which is&lt;br&gt;
a built-in function, so I think that my optimization stops here (so&lt;br&gt;
long as I want to use the mouse as the tool to select the cells, and I&lt;br&gt;
don't see a better option).  C'est la vie.&lt;br&gt;
&lt;br&gt;
- Chris</description>
    </item>
    <item>
      <pubDate>Fri, 13 Jun 2008 16:03:03 -0400</pubDate>
      <title>Re: Any way to speed up drawing of tiny patch object?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/170871#437329</link>
      <author>Kenneth Eaton</author>
      <description>&amp;gt; So I've traced the problem to a call &lt;br&gt;
to &quot;waitforbuttonpress&quot;, which is&lt;br&gt;
&amp;gt; a built-in function, so I think that my optimization &lt;br&gt;
stops here (so&lt;br&gt;
&amp;gt; long as I want to use the mouse as the tool to select the &lt;br&gt;
cells, and I&lt;br&gt;
&amp;gt; don't see a better option).  C'est la vie.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; - Chris&lt;br&gt;
&lt;br&gt;
Have you thought of writing your own point selection &lt;br&gt;
routine using the WindowButtonFcns of the figure and the &lt;br&gt;
CurrentPoint property of the axes? You may be able to write &lt;br&gt;
a simpler, bare-bones version that runs faster.&lt;br&gt;
&lt;br&gt;
Ken</description>
    </item>
    <item>
      <pubDate>Fri, 13 Jun 2008 16:44:02 -0400</pubDate>
      <title>Re: Any way to speed up drawing of tiny patch object?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/170871#437335</link>
      <author>Darik </author>
      <description>&quot;Chris P.&quot; &amp;lt;chris.peressotti@gmail.com&amp;gt; wrote in message&lt;br&gt;
&amp;lt;77d1cc7e-35a5-4f8f-8baa-dde45491f432@w7g2000hsa.googlegroups.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt; SO, the problem is somewhere in ginput itself, yes? &lt;br&gt;
Does anyone have any ideas?&lt;br&gt;
&amp;gt; &amp;gt; (I'm going to go through ginput with a fine-toothed comb&lt;br&gt;
&amp;gt; &amp;gt; right now, but I thought I'd give this update in case&lt;br&gt;
anyone has a&lt;br&gt;
&amp;gt; &amp;gt; quick answer.)&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; So I've traced the problem to a call to&lt;br&gt;
&quot;waitforbuttonpress&quot;, which is&lt;br&gt;
&amp;gt; a built-in function, so I think that my optimization stops&lt;br&gt;
here (so&lt;br&gt;
&amp;gt; long as I want to use the mouse as the tool to select the&lt;br&gt;
cells, and I&lt;br&gt;
&amp;gt; don't see a better option).  C'est la vie.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; - Chris&lt;br&gt;
&lt;br&gt;
It's atrocious that ginput takes so long. Use the&lt;br&gt;
ButtonDownFcn property of the image to define your own&lt;br&gt;
callback to select a cell.</description>
    </item>
    <item>
      <pubDate>Fri, 13 Jun 2008 19:32:45 -0400</pubDate>
      <title>Re: Any way to speed up drawing of tiny patch object?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/170871#437356</link>
      <author>Chris P.</author>
      <description>@ Ken and Darik&lt;br&gt;
&lt;br&gt;
I had _not_ thought to write my own callback... and I've got a little&lt;br&gt;
bit of experience with that stuff, already.  Thanks for the&lt;br&gt;
suggestion!&lt;br&gt;
&lt;br&gt;
- Chris</description>
    </item>
    <item>
      <pubDate>Fri, 13 Jun 2008 21:29:07 -0400</pubDate>
      <title>Re: Any way to speed up drawing of tiny patch object?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/170871#437362</link>
      <author>Chris P.</author>
      <description>&amp;gt; I had _not_ thought to write my own callback... and I've got a little&lt;br&gt;
&amp;gt; bit of experience with that stuff, already.  Thanks for the&lt;br&gt;
&amp;gt; suggestion!&lt;br&gt;
&lt;br&gt;
I gave it a go and it doesn't seem to be any faster, somehow.  Would&lt;br&gt;
anyone looking at this thread care to have a look at my code to see&lt;br&gt;
what I might be doing wrong?&lt;br&gt;
&lt;br&gt;
- Chris</description>
    </item>
    <item>
      <pubDate>Thu, 13 Nov 2008 16:07:01 -0500</pubDate>
      <title>Re: Any way to speed up drawing of tiny patch object?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/170871#610724</link>
      <author>J.D. Krijnders</author>
      <description>&quot;Chris P.&quot; &amp;lt;chris.peressotti@gmail.com&amp;gt; wrote in message &amp;lt;c5f6b0dc-116b-4ce5-8153-ee33925804d6@a70g2000hsh.googlegroups.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt; I had _not_ thought to write my own callback... and I've got a little&lt;br&gt;
&amp;gt; &amp;gt; bit of experience with that stuff, already.  Thanks for the&lt;br&gt;
&amp;gt; &amp;gt; suggestion!&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I gave it a go and it doesn't seem to be any faster, somehow.  Would&lt;br&gt;
&amp;gt; anyone looking at this thread care to have a look at my code to see&lt;br&gt;
&amp;gt; what I might be doing wrong?&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; - Chris&lt;br&gt;
&lt;br&gt;
I had the same problem and worked around it like this. I copied ginput and commented out the lines with uisuspend and uirestore in them and put those calls in my own code surrounding the ginput. Something like this:&lt;br&gt;
&lt;br&gt;
state = uisuspend(gcf);&lt;br&gt;
while(loop)&lt;br&gt;
&amp;nbsp;[x y] = ginput_noui(1); % modified version which doesn't use uisuspend or uirestore&lt;br&gt;
&amp;nbsp;loop = do_something(x,y);&lt;br&gt;
end&lt;br&gt;
uirestore(state);&lt;br&gt;
&lt;br&gt;
this solved my problems, just make sure the uirestore gets called everytime or your gui will stop behaving properly.&lt;br&gt;
Hope this works for you too,&lt;br&gt;
&lt;br&gt;
Dirkjan Krijnders</description>
    </item>
  </channel>
</rss>

