<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/237524</link>
    <title>MATLAB Central Newsreader - getimage (IPT) weirdness</title>
    <description>Feed for thread: getimage (IPT) weirdness</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>Tue, 14 Oct 2008 18:21:02 -0400</pubDate>
      <title>getimage (IPT) weirdness</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/237524#605227</link>
      <author>Eddie </author>
      <description>So, my understanding of the documentation of the getimage function from the Image Processing Toolbox is that if I say:&lt;br&gt;
&lt;br&gt;
xp = linspace(-10,10,350);&lt;br&gt;
fig = figure;&lt;br&gt;
plot(xp,xp.^2);&lt;br&gt;
A = getimage(fig);&lt;br&gt;
&lt;br&gt;
A should now be a matrix that contains the data relating to the pixels of the figure with the plotted parbola.  However, when I try this, A is empty.&lt;br&gt;
&lt;br&gt;
What I am doing wrong?</description>
    </item>
    <item>
      <pubDate>Tue, 14 Oct 2008 18:27:47 -0400</pubDate>
      <title>Re: getimage (IPT) weirdness</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/237524#605230</link>
      <author>Walter Roberson</author>
      <description>Eddie wrote:&lt;br&gt;
&amp;gt; So, my understanding of the documentation of the getimage function from the Image Processing&lt;br&gt;
&amp;gt; Toolbox is that if I say:&lt;br&gt;
&lt;br&gt;
&amp;gt; xp = linspace(-10,10,350);&lt;br&gt;
&amp;gt; fig = figure;&lt;br&gt;
&amp;gt; plot(xp,xp.^2);&lt;br&gt;
&amp;gt; A = getimage(fig);&lt;br&gt;
&amp;nbsp;&lt;br&gt;
&amp;gt; A should now be a matrix that contains the data relating to the pixels of the figure with&lt;br&gt;
&amp;gt; the plotted parbola.  However, when I try this, A is empty.&lt;br&gt;
&amp;gt; What I am doing wrong?&lt;br&gt;
&lt;br&gt;
Look at the documentation again. getimage() returns whatever is in the first CData array&lt;br&gt;
that is found under the given handle. Objects of type image have CData arrays (as well as&lt;br&gt;
some other kinds of objects such as objects of type patch), but plot() creates&lt;br&gt;
objects of time axes and lineseries, neither of which have CData arrays.&lt;br&gt;
&lt;br&gt;
Perhaps what you wanted to look at was getframe().</description>
    </item>
    <item>
      <pubDate>Tue, 14 Oct 2008 18:52:01 -0400</pubDate>
      <title>Re: getimage (IPT) weirdness</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/237524#605231</link>
      <author>Eddie </author>
      <description>Walter Roberson &amp;lt;roberson@hushmail.com&amp;gt; wrote in message &amp;lt;ew5Jk.11$tV.9@newsfe08.iad&amp;gt;...&lt;br&gt;
&amp;gt; Eddie wrote:&lt;br&gt;
&amp;gt; &amp;gt; So, my understanding of the documentation of the getimage function from the Image Processing&lt;br&gt;
&amp;gt; &amp;gt; Toolbox is that if I say:&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; xp = linspace(-10,10,350);&lt;br&gt;
&amp;gt; &amp;gt; fig = figure;&lt;br&gt;
&amp;gt; &amp;gt; plot(xp,xp.^2);&lt;br&gt;
&amp;gt; &amp;gt; A = getimage(fig);&lt;br&gt;
&amp;gt;  &lt;br&gt;
&amp;gt; &amp;gt; A should now be a matrix that contains the data relating to the pixels of the figure with&lt;br&gt;
&amp;gt; &amp;gt; the plotted parbola.  However, when I try this, A is empty.&lt;br&gt;
&amp;gt; &amp;gt; What I am doing wrong?&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Look at the documentation again. getimage() returns whatever is in the first CData array&lt;br&gt;
&amp;gt; that is found under the given handle. Objects of type image have CData arrays (as well as&lt;br&gt;
&amp;gt; some other kinds of objects such as objects of type patch), but plot() creates&lt;br&gt;
&amp;gt; objects of time axes and lineseries, neither of which have CData arrays.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Perhaps what you wanted to look at was getframe().&lt;br&gt;
&lt;br&gt;
OK, you're right.  I saw that a figure was a valid argument to the function, and assumed magic would happen.  getframe() won't work for my purposes though because I need to suppress the actual display of the plot, and getframe() requires the figure to be visible.  Other suggestions?</description>
    </item>
  </channel>
</rss>

