Thanks Marcus.<div><br></div><div>The code I had somehow disabled mouse interactions - I wasn't able to zoom or interact with the renderWindow that I created - however using your code snippet it worked out. (instead of creating a new QVTKInteractor, use the one from QVTKWidget). Not sure why though.</div>
<div><br></div><div><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; ">"Thanks - I have been working really hard on getting all the pieces in place for the release. There are quite a few things I would like to do, but think that the 2D API coupled with the 2D scene, chart API and mark API should give VTK a powerful suite of tools for rendering 2D views."</span></div>
<div><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; "><br></span></div><div><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; ">Good job man, its looking real pretty.</span></div>
<div><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; "><br></span></div><div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;">I'm running into an issue I can't figure out -</span></font></div>
<div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;">I have a table with { Index, X, Value } columns, I want to plot Value against Index (Index on X-Axis), but instead of using Index as the tick marks, I want to replace the tick marks in index with the corresponding X values. (if i plot Value against X, it'll give me a different plot because X goes from -3 -> 0 -> 3 while Index goes from 0 -> 500) </span></font></div>
<div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;">I tried using </span></font></div><div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;">(vtkPlot)->GetXAxis()->SetTickLabels() </span></font></div>
<div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;">but I don't think its doing what I expected it to do. Any ideas?</span></font></div><div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;"><br>
</span></font></div><div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;">Thanks.</span></font></div><div><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; "><br>
</span></div><div><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; "><br></span></div><br><div class="gmail_quote">On Wed, Apr 21, 2010 at 4:36 PM, Marcus D. Hanwell <span dir="ltr"><<a href="mailto:marcus.hanwell@kitware.com">marcus.hanwell@kitware.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="gmail_quote"><div class="im">On Wed, Apr 21, 2010 at 6:19 PM, da <span dir="ltr"><<a href="mailto:remywendy@gmail.com" target="_blank">remywendy@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Thanks Eric.<div><br></div><div>I ended up doing something like this</div><div><br></div><div><div><span style="white-space:pre">        </span>vtkSmartPointer<QVTKInteractor> renderWindowInteractor = vtkSmartPointer<QVTKInteractor>::New();</div>
<div><span style="white-space:pre">        </span>renderWindowInteractor->SetRenderWindow(<b>(vtkContextView)</b>->GetRenderWindow());</div><div><span style="white-space:pre">        </span>renderWindowInteractor->Initialize();</div>
<div><br></div><div><span style="white-space:pre">        </span><b>(QVTKWidget)</b>->SetRenderWindow(<b>(vtkContextView)</b>->GetRenderWindow());</div><div><br></div></div></blockquote></div><div>The following should work, but I should add an example to VTK to demonstrate this (and test that it continues to compile),</div>
<div> </div><div>QVTKWidget* widget = new QVTKWidget;</div><div>vtkContextView* view = vtkContextView::New();</div><div>view->SetInteractor(widget->GetInteractor());</div><div><div>widget->SetRenderWindow(view->GetRenderWindow());</div>
</div><div><br></div><div>It follows the normal vtkRenderView issues around creating a QVTKWidget that properly contains a render view. This is the basic approach used in ParaView (hidden in a few proxies).</div><div class="im">
<div><br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div></div><div>since QVTKWidget requires a QVTKInteractor as the Interactor. I created a new QVTKInteractor, attached it as vtkContextView's interactor, and then just set the renderwindow from context view into the qvtkwidget.</div>
</div></blockquote><div><br></div></div><div>I may refactor the context view to be a little more lightweight (the render view it currently derives from contains quite a few things that are not used by the context view). </div>
<div class="im">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<div><br></div><div>(BTW, thanks to the guys developing the new chart classes, they look very nice! Especially in Paraview!)</div><div><div><br></div></div></div></blockquote></div><div>Thanks - I have been working really hard on getting all the pieces in place for the release. There are quite a few things I would like to do, but think that the 2D API coupled with the 2D scene, chart API and mark API should give VTK a powerful suite of tools for rendering 2D views.</div>
<div><br></div><div>Sandia and the Titan project have played a key role in funding and steering the development of the new 2D APIs and charts in VTK/ParaView. We will continue collaborating with them as we move forward with this work.</div>
<div><br></div><div>Thanks,</div><div><br></div><font color="#888888"><div>Marcus </div></font><div class="im"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div>
<div></div><br><div class="gmail_quote">
On Wed, Apr 21, 2010 at 12:11 PM, Eric E. Monson <span dir="ltr"><<a href="mailto:emonson@cs.duke.edu" target="_blank">emonson@cs.duke.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br>
<br>
As long as you are programming in C++ I think you can follow the examples in [vtksource]/Examples/Infovis/Cxx -- there they have things like EasyView that put a vtkGraphLayoutView into a QVTKWidget. I haven't tried this with the Charts specifically, but since vtkContextView is also a vtkRenderView, hopefully you can do the same thing:<br>
<br>
// Graph View needs to get my render window<br>
this->GraphView->SetInteractor(this->ui->vtkGraphViewWidget->GetInteractor());<br>
this->ui->vtkGraphViewWidget->SetRenderWindow(this->GraphView->GetRenderWindow());<br>
<br>
(The reason I say that hopefully you're using C++ is that I can't get this to work with the Python wrappers and PyQt4...)<br>
<br>
-Eric<br>
<br>
------------------------------------------------------<br>
<font color="#888888">Eric E Monson<br>
Duke Visualization Technology Group<br>
</font><div><br>
<br>
On Apr 21, 2010, at 12:28 PM, da wrote:<br>
<br>
> Hey everyone,<br>
><br>
> I've been playing around with the plotting functionality: first the older vtkQt* classes and now I'm looking at VTK/Charts classes. It seems that vtkContextView is an entire "view" in itself. How would I get this embedded into a QWidget? I've been using QVTKWidget previously but I don't think I can just put the renderer from the context view into the qvtkwidget?<br>
><br></div></blockquote></div></div></div></blockquote></div></div>
</blockquote></div><br>