[prev in list] [next in list] [prev in thread] [next in thread] 

List:       vtkusers
Subject:    Re: [vtkusers] VTK and Winforms integration
From:       Andres Felipe Ruiz <andresfeliperu () gmail ! com>
Date:       2013-05-31 16:42:57
Message-ID: CAFe+Q0o=6FBNwU1nCPJzYHOE06Pf1yZkgC7nGz=H_D=LqSTJuQ () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Thank you all for yor help, but now I am facing another different problem.
I was able to include the VTK window in a Windows Form form from c++. I am
trying to get the example of the sphere to work, but there is some casting
I have not been able to do.

I would like to cast a Kitware::VTK::vtkRenderWindow to a vtkRenderWindow
that is usted in this
<http://www.vtk.org/Wiki/VTK/Examples/Cxx/GeometricObjects/Sphere>
example

Thank you all very much for your help!.

asdf


On Fri, May 31, 2013 at 10:18 AM, bnsteel <bnsteel@gmail.com> wrote:

> I used Swig (http://www.swig.org/) to manage interactions between a C++
> dll
> and my c# windows application.
>
> I felt that Activiz was not right for me since my data was in the C++ side
> and I didn't want to wrangle it over the c# in order to have the vtk
> wrapper
> push it back to c++.
>
> I made a method to pass the handle of my windows panel to the vtk render
> window
>
> C++ side
> setImageRenderWindowParentID(void *theID){
>         ... (init your vtk render window)
>         renWin2->SetParentId(theID);
> }
>
> C# side
>
>  swig3d.setRenderWindowParentID(m_panel.Handle);
>
>
>
> where swig3d is the handle ( via swig) to my C++ class that handles the vtk
> stuff.  I have to handle all of the user interactions between C# and C++,
> so
> it was a good amount of typing, but I get to use the latest and greatest
> vtk
> without the overhead of activiz.
>
>  You will have to update the render window size each time your widows panel
> is re-sized, but everything else can be done on the c++ side.
>
> brooke
>
>
>
> --
> View this message in context:
> http://vtk.1045678.n5.nabble.com/VTK-and-Winforms-integration-tp5721086p5721097.html
> Sent from the VTK - Users mailing list archive at Nabble.com.
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>



-- 
asdf

[Attachment #5 (text/html)]

<div dir="ltr">Thank you all for yor help, but now I am facing another different \
problem. I was able to include the VTK window in a Windows Form form from c++. I am \
trying to get the example of the sphere to work, but there is some casting I have not \
been able to do.<div>

<br></div><div>I would like to cast a Kitware::VTK::vtkRenderWindow to a \
vtkRenderWindow that is usted in <a \
href="http://www.vtk.org/Wiki/VTK/Examples/Cxx/GeometricObjects/Sphere">this \
</a>example</div><div><br></div><div>

Thank you all very much for your help!.</div><div \
class="gmail_extra"><br>asdf</div><div class="gmail_extra"><br><br><div \
class="gmail_quote">On Fri, May 31, 2013 at 10:18 AM, bnsteel <span dir="ltr">&lt;<a \
href="mailto:bnsteel@gmail.com" target="_blank">bnsteel@gmail.com</a>&gt;</span> \
wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex">I used Swig (<a href="http://www.swig.org/" \
target="_blank">http://www.swig.org/</a>) to manage interactions between a C++ \
dll<br>


and my c# windows application.<br>
<br>
I felt that Activiz was not right for me since my data was in the C++ side<br>
and I didn&#39;t want to wrangle it over the c# in order to have the vtk wrapper<br>
push it back to c++.<br>
<br>
I made a method to pass the handle of my windows panel to the vtk render<br>
window<br>
<br>
C++ side<br>
setImageRenderWindowParentID(void *theID){<br>
        ... (init your vtk render window)<br>
        renWin2-&gt;SetParentId(theID);<br>
}<br>
<br>
C# side<br>
<br>
 swig3d.setRenderWindowParentID(m_panel.Handle);<br>
<br>
<br>
<br>
where swig3d is the handle ( via swig) to my C++ class that handles the vtk<br>
stuff.  I have to handle all of the user interactions between C# and C++, so<br>
it was a good amount of typing, but I get to use the latest and greatest vtk<br>
without the overhead of activiz.<br>
<br>
 You will have to update the render window size each time your widows panel<br>
is re-sized, but everything else can be done on the c++ side.<br>
<br>
brooke<br>
<br>
<br>
<br>
--<br>
View this message in context: <a \
href="http://vtk.1045678.n5.nabble.com/VTK-and-Winforms-integration-tp5721086p5721097.html" \
target="_blank">http://vtk.1045678.n5.nabble.com/VTK-and-Winforms-integration-tp5721086p5721097.html</a><br>



Sent from the VTK - Users mailing list archive at Nabble.com.<br>
<div class="HOEnZb"><div \
class="h5">_______________________________________________<br> Powered by <a \
href="http://www.kitware.com" target="_blank">www.kitware.com</a><br> <br>
Visit other Kitware open-source projects at <a \
href="http://www.kitware.com/opensource/opensource.html" \
target="_blank">http://www.kitware.com/opensource/opensource.html</a><br> <br>
Please keep messages on-topic and check the VTK FAQ at: <a \
href="http://www.vtk.org/Wiki/VTK_FAQ" \
target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br> <br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" \
target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br> \
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>asdf \
</div></div>



_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic