Yes, I think so. I have work in progress that does something just like that, it's on the stage/midas-kiwi branch. The work on that branch is progressing slowly, but I hope it will eventually make it's way into master and can be part of a future release.<br>
<br>I still recommend that William derive a custom app class. The vesKiwiViewerApp class is reusable for basic functions, but most apps will eventually require some customizations that are beyond the scope of the KiwiViewer base app.<br>
<br>Pat<br><br><div class="gmail_quote">On Wed, Nov 14, 2012 at 3:39 PM, Aashish Chaudhary <span dir="ltr"><<a href="mailto:aashish.chaudhary@kitware.com" target="_blank">aashish.chaudhary@kitware.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Pat, <div><br></div><div>Should we add an API to addDataset(..) or something similar so that we can support this use case? </div>
<div><br></div><div>Thanks</div><div><div><div class="h5"> <br><br><div class="gmail_quote">On Tue, Nov 13, 2012 at 7:37 PM, Pat Marion <span dir="ltr"><<a href="mailto:pat.marion@kitware.com" target="_blank">pat.marion@kitware.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Are you are using the vesKiwiViewerApp class? And you are using vesKiwiViewerApp::loadDataset(std::string filename) to load the skull dataset? If that's the case, then the problem you're having is that the loadDataset() method calls this->resetScene() before loading the new data, so each time you call it, it replaces the current scene.<br>
<br>What I recommend is that you subclass vesKiwiViewerApp so that you have your own custom app class that can implement your app's behavior. Then write some methods like this:<br><br>class MyApp : public vesKiwiViewerApp<br>
{<br>public:<br><br>void loadScene()<br>{<br> vtkSmartPointer<vtkDataSet> skull = this->getSkull();<br> vtkSmartPointer<vtkDataSet> pin = this->getPin();<br><br> this->addRepresentationsForDataSet(skull);<br>
this->addRepresentationsForDataSet(pin);<br>}<br><br>vtkSmartPointer<vtkDataSet> getSkull()<br>{<br> std::string filename = "/path/to/skull.vtp";<br> vesKiwiDataLoader loader;<br> return this->Internal->loader.loadDataset(filename);<br>
}<br><br>vtkSmartPointer<vtkDataSet> getPin()<br>{<br> std::string filename = "/path/to/pin.vtp";<br> vesKiwiDataLoader loader;<br> return this->Internal->loader.loadDataset(filename);<br>}<br><br>
};<br><br><br><div class="gmail_quote"><div><div>On Wed, Nov 14, 2012 at 8:52 AM, William Grand <span dir="ltr"><<a href="mailto:wgrand@grandinteractive.com" target="_blank">wgrand@grandinteractive.com</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div>
<div style="word-wrap:break-word">Hi,<div><br></div><div>I have a model of a skull, but I want the ability to add 3D pins to it. </div><div><br></div><div>How would I add my 3D pin to the scene? Can someone point me the right direction?</div>
<div>I'm not sure how to add objects without swapping out the skull model.</div><div><br></div><div>Thanks,</div><div>William</div><div><br></div><div><br><div>
<div><div><font color="#fd4233">_________________________________</font></div><span><font color="#888888"><div><b>William Grand</b> | Founder & CEO</div><div>Grand Interactive, Boston</div><div><span style="color:rgb(95,95,95)"><a href="tel:617.652-0545" value="+16176520545" target="_blank">617.652-0545</a> | <a href="http://www.grandinteractive.com" target="_blank">www.grandinteractive.com</a></span></div>
</font></span></div>
</div>
<br></div></div><br></div></div>_______________________________________________<br>
Ves mailing list<br>
<a href="mailto:Ves@public.kitware.com" target="_blank">Ves@public.kitware.com</a><br>
<a href="http://public.kitware.com/cgi-bin/mailman/listinfo/ves" target="_blank">http://public.kitware.com/cgi-bin/mailman/listinfo/ves</a><br>
<br></blockquote></div><br>
<br>_______________________________________________<br>
Ves mailing list<br>
<a href="mailto:Ves@public.kitware.com" target="_blank">Ves@public.kitware.com</a><br>
<a href="http://public.kitware.com/cgi-bin/mailman/listinfo/ves" target="_blank">http://public.kitware.com/cgi-bin/mailman/listinfo/ves</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div></div></div><span class="HOEnZb"><font color="#888888">-- <br>| Aashish Chaudhary <br>| R&D Engineer <br>| Kitware Inc. <br>| <a href="http://www.kitware.com" target="_blank">www.kitware.com</a> <br>
</font></span></div>
</blockquote></div><br>