[vtkusers] BoxWidget + VolumeMapper errors

Lisa Avila lisa.avila at kitware.com
Thu May 27 10:34:28 EDT 2004


Hi Dean,

I think you are adding the same internal plane object six times - so only 
the last one is in there.

Lisa


At 07:43 PM 5/26/2004, dean.inglis at camris.ca wrote:

>I am trying to use vtkBoxWidget with a callback to send its vtkPlanes
>to a vtkVolumeMapper as in
>VTK/Examples/GUI/Tcl/VolumeRenderWithBoxWidget.tcl
>Apparently, I should be passing in a vtkPlaneCollection, so I tried
>modifying my callback:
>
>class vtkBWCallback : public vtkCommand
>{
>public:
>   static vtkBWCallback *New()
>     { return new vtkBWCallback; }
>
>   virtual void Execute(vtkObject *caller, unsigned long, void*)
>     {
>       vtkBoxWidget *box = reinterpret_cast<vtkBoxWidget*>(caller);
>       box->GetPlanes( planes);
>       collection->RemoveAllItems();
>       for (int i = 0; i < planes->GetNumberOfPlanes(); i++)
>         {
>         collection->AddItem( planes->GetPlane(i) );
>         }
>       mapper->SetClippingPlanes( collection );
>     }
>   vtkBWCallback():planes(0),mapper(0),pc(0){};
>
>   vtkPlanes* planes;
>   vtkPlaneCollection* collection;
>   vtkVolumeTextureMapper2D* mapper;
>};
>
>no luck!
>
>I only get one plane acting as a clipping plane in both my .cxx app
>  and in the above VTK tcl example.  The plane with unit normal
>originally in the +z direction is the only valid plane.
>Can anyone else verify this error?  This is seen on two builds:
>
>1) Borland C++ Builder vers. 5 , Win 2k Pro, Pentium 4,
>NVIDIA GeForce4 Ti 4400, driver 5.3.0.3, CMake 2.0.0, latest VTK cvs
>
>2) Borland C++ Builder vers. 6 , Win 2k Pro, Pentium 4 mobile,
>NVIDIA Quadro4 500 GoGL,  driver 2.9.4.0, CMake 2.0.0, latest VTK cvs
>
>Dean
>
>_______________________________________________
>This is the private VTK discussion list.
>Please keep messages on-topic. Check the FAQ at: 
><http://public.kitware.com/cgi-bin/vtkfaq>
>Follow this link to subscribe/unsubscribe:
>http://www.vtk.org/mailman/listinfo/vtkusers






More information about the vtkusers mailing list