<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/236075</link>
    <title>MATLAB Central Newsreader - is MATLAB GUI + vtk renderer possible?</title>
    <description>Feed for thread: is MATLAB GUI + vtk renderer possible?</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, 19 Feb 2009 12:26:02 -0500</pubDate>
      <title>Re: is MATLAB GUI + vtk renderer possible?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/236075#629436</link>
      <author>Baran Aydogan</author>
      <description>Here is some related information;&lt;br&gt;
&lt;br&gt;
&lt;a href=&quot;http://www.vtk.org/Wiki/VTK/VTKMatlab&quot;&gt;http://www.vtk.org/Wiki/VTK/VTKMatlab&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
I could make the above link work; but this was not what I was trying to achieve exactly. I can render using VTK through MATLAB however I cannot visualize in a MATLAB figure.</description>
    </item>
    <item>
      <pubDate>Thu, 19 Feb 2009 14:04:01 -0500</pubDate>
      <title>Re: is MATLAB GUI + vtk renderer possible?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/236075#629455</link>
      <author>Greg </author>
      <description>&quot;Baran Aydogan&quot; &amp;lt;baran.aydogan@tut.fi&amp;gt; wrote in message &amp;lt;gnjj4p$nqf$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; Here is some related information;&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &lt;a href=&quot;http://www.vtk.org/Wiki/VTK/VTKMatlab&quot;&gt;http://www.vtk.org/Wiki/VTK/VTKMatlab&lt;/a&gt;&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I could make the above link work; but this was not what I was trying to achieve exactly. I can render using VTK through MATLAB however I cannot visualize in a MATLAB figure.&lt;br&gt;
&lt;br&gt;
Hi Baran,&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;Unfortunately this post isn't really answering your question, but rather posing one for you. I am curious why you are looking to render the MATLAB figure in VTK. Is there some particular set of functionality you need that is not available in MATLAB that VTK offers?&lt;br&gt;
&lt;br&gt;
Please feel free to elaborate. You may also use my email address if you would rather not add that kind of information to this post.&lt;br&gt;
&lt;br&gt;
Cheers,&lt;br&gt;
-Greg</description>
    </item>
    <item>
      <pubDate>Thu, 19 Feb 2009 16:36:01 -0500</pubDate>
      <title>Re: is MATLAB GUI + vtk renderer possible?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/236075#629509</link>
      <author>Phil Goddard</author>
      <description>&lt;br&gt;
The easiest approach to incorporating VTK into a MATLAB figure window is to use the ActiViz COM object available from www.kitware.com.&lt;br&gt;
(KitWare are the people who write/maintain the core VTK code.)&lt;br&gt;
It is a fully functional COM interface into VTK and can easily be instantated in MATLAB using the function actxcontrol.&lt;br&gt;
Unfortunately it is only compiled for win32, and does cost (about $4000 if I remember correctly).&lt;br&gt;
&lt;br&gt;
There are a couple of other alternatives for calling VTK from MATLAB, none of them currently allow for embedding the VTK renderer into a figure window, but with a little effort a lot can be done by using a &quot;2 window&quot; approach: visualization rendering performed in a VTK window with other UI functionality in a MATLAB figure/UI. &lt;br&gt;
&lt;br&gt;
- writing a mex file that calls your VTK code.&lt;br&gt;
This is described in the link posted in this thread, and there's also a mex file example on the File Exchange (just search it for VTK).&lt;br&gt;
&lt;br&gt;
- writing your own COM object called from MATLAB using actxserver.&lt;br&gt;
(I have found this particularly useful when you need the same code to work from not just MATLAB but also from other C code and FORTRAN, and also on different platforms like win32, win64, linux, etc.)&lt;br&gt;
With enough effort this could be extended to become a COM control embeddable in a figure window but I have not done that.&lt;br&gt;
&lt;br&gt;
And for the future, but again at a price:&lt;br&gt;
- Kitware have recently released a (multi-platform) .NET version of their COM object.&lt;br&gt;
Hopefully it won't be long before these can be called directly from MATLAB in a similar way to the way that generic dlls can be called now.&lt;br&gt;
&lt;br&gt;
As for Greg's question about why to go to VTK, I went there for 2 reasons:&lt;br&gt;
- I have some images that cannot be efficiently rotated when displayed in a MATLAB figure window.&lt;br&gt;
(In VTK when the mouse is moved the images smoothly rotate.&lt;br&gt;
In MATLAB when the mouse is moved the image rotates a couple of degrees then redraws, moves a couple more degrees then redraws, etc, etc, making for &quot;chunky graphics&quot;.&lt;br&gt;
I sent an example to MathWorks tech support and they don't believe it can be done any faster in MATLAB.)&lt;br&gt;
- I was doing the work for a consulting client who needed to call the same graphics from not just MATLAB but also C and FORTRAN.&lt;br&gt;
&lt;br&gt;
Phil.</description>
    </item>
    <item>
      <pubDate>Fri, 20 Feb 2009 09:00:20 -0500</pubDate>
      <title>Re: is MATLAB GUI + vtk renderer possible?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/236075#629642</link>
      <author>Baran Aydogan</author>
      <description>Thank you for both comments. Phil's post especially is really useful not only for me but also for others who are searching similar threads in the Newsreader.&lt;br&gt;
&lt;br&gt;
As a brief answer to Greg regarding the comparison between MATLAB and VTK, I can group the reasons into three.&lt;br&gt;
&lt;br&gt;
1 - VTK is faster and gives better quality results in 3D rendering&lt;br&gt;
2 - It can handle larger data better than MATLAB&lt;br&gt;
3 - It has additional routines for 3D image manipulation, (e.g: vtkMassProperties) that MATLAB does not have&lt;br&gt;
&lt;br&gt;
Ideally I would like to have everything in MATLAB. It really speeds up researchers' job to test algorithms; also enables making GUIs very quickly. However it is not perfect of course and needs improvement. &lt;br&gt;
&lt;br&gt;
I quickly wrote three main points that improvement is needed. One can of add additional tweaks to MATLAB in order to match VTK's performance in 3D image manipulation and visualization.&lt;br&gt;
&lt;br&gt;
Regards,&lt;br&gt;
&lt;br&gt;
-Baran</description>
    </item>
    <item>
      <pubDate>Tue, 16 Sep 2008 14:05:03 -0400</pubDate>
      <title>is MATLAB GUI + vtk renderer possible?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/236075#600551</link>
      <author>Baran Aydogan</author>
      <description>Hi,&lt;br&gt;
&lt;br&gt;
I wonder if it is possible to use the vtk renderer in MATLAB GUIs? &lt;br&gt;
&lt;br&gt;
More precisely speaking, is such a thing like; passing the handle of some axes to a mex file and rendering that axes using vtk possible?&lt;br&gt;
&lt;br&gt;
Thanks,&lt;br&gt;
&lt;br&gt;
-Baran</description>
    </item>
  </channel>
</rss>

