[vtkusers] the sphere not be dsiplayed with the vvtkboxwidget

Eric E. Monson emonson at cs.duke.edu
Wed Jun 30 08:59:08 EDT 2010


Hey Ali,

Hmm... I don't know anything about the .NET setup, but it seems strange that it would have a vtkBoxWidget2 and not a vtkBoxRepresentation... Maybe with your .NET you are limited to a much older version of VTK?

Anyway, if that really doesn't exist, then you may have to use the older vtkBoxWidget instead. There are a few examples which are all pretty similar to each other. Check out the vtkBoxWidget doxygen page:

http://www.vtk.org/doc/nightly/html/classvtkBoxWidget.html

and look under Examples and Tests at the end of the Detailed Description. In the VTK source there is /Examples/Tutorial/Step6/Cxx/BoxWidget.cxx which displays both a cone and a box widget simultaneously. 

Talk to you later,
-Eric


On Jun 29, 2010, at 4:47 PM, Ali Habib wrote:

> Dear Eric,
> Unfortunately Managed VTK for .nET don't contain vtkboxrepresentation as in the example,
> 
> is there any work around, to fix that  
> 
> Best regards 
> 
> On Mon, Jun 28, 2010 at 4:25 PM, Eric E. Monson <emonson at cs.duke.edu> wrote:
> Hey Ali,
> 
> You need to uncomment the line:
> 
>  renderer->AddActor(actor);
> 
> and then add a line after the vtkBoxRepresentation is created:
> 
>  boxRepresentation->PlaceWidget(sphereSource->GetOutput()->GetBounds());
> 
> Take a look at the BoxWidget2 test code (linked from the vtkBoxWidget2 doxygen page: http://www.vtk.org/doc/nightly/html/classvtkBoxRepresentation.html) to see how to link the box to a transform of the sphere:
> 
> http://public.kitware.com/cgi-bin/viewcvs.cgi/*checkout*/Widgets/Testing/Cxx/BoxWidget2.cxx?root=VTK&content-type=text/plain
> 
> -Eric
> 
> ------------------------------------------------------
> Eric E Monson
> Duke Visualization Technology Group
> 
> 
> On Jun 27, 2010, at 5:17 PM, Sebastien Jourdain wrote:
> 
> > Maybe the sphere is there, but it can be to small to see it ?
> > Did you Place/setBounds of the widget so both the sphere and the
> > widget share the same scale ?
> >
> > Seb
> >
> > On Fri, Jun 25, 2010 at 6:15 PM, Ali Habib <ali.mahmoud.habib at gmail.com> wrote:
> >> Hi
> >> I tried to apply the example on the following link
> >> http://www.cmake.org/Wiki/VTK/Examples/Widgets/BoxWidget2
> >> But the result is just the vtkboxwidgwet, how to modify it to display both
> >> the sphere and the vtkboxwidget
> >> BEst regards
> >> _______________________________________________
> >> 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
> >>
> >>
> > _______________________________________________
> > 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
> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100630/339f6da3/attachment.htm>


More information about the vtkusers mailing list