[vtkusers] Re: vtkImagePlaneWidgets texture update

Stefan Maas stefan.maas at fh-gelsenkirchen.de
Wed Feb 23 05:09:15 EST 2005


Hi Dean,

this is a piece of my code (java) where you can see, how the ipws are
connected. Your trick with holding the camera seems to be very nice but
the problem is that the 2D-ipw still is moving around - what is not so
nice. I tried this before, too. What I now do is following:

ipw1.SetInput(mandelbrot1.GetOutput());
ipw1.SetInteractor(renWin.getIren());
ipw1.SetPlaneOrientationToXAxes();
ipw1.GetPlaneProperty().SetColor(1, 0, 0);
ipw1.SetSliceIndex(0);
ipw1.On();
ipw1.UpdatePlacement();

ipw2.SetInput(mandelbrot1.GetOutput());
ipw2.SetPlaneOrientationToXAxes();
ipw2.GetTexture().SetInput(ipw1.GetTexture().GetInput());
ipw2.GetPlaneProperty().SetColor(ipw1.GetPlaneProperty().GetColor());
ipw2.SetSliceIndex(ipw1.GetSliceIndex());
ipw2.SetLookupTable(ipw1.GetLookupTable());
ipw2.SetColorMap(ipw1.GetColorMap());

I tried to connect many values between the ipws, but only if I share
everything (like ipw2 = ipw1) the texture is shown correctly when I try
a diagonal cut. (But then the 2D-ipw is moving and I need your
camera-trick.)
In principle I need to know what "holds" the texture on the correct
position on the ipw without moving the 2D-ipw.
Something must happen with the texture when I change to
"diagonal-cutting-mode". But only with the texture, because the data
that I get by clicking on the ipw are still correct...very strange.

Thanks for your help.

Stefan

-------------------------------------------------

>Stefan,

>can you post code, tcl or cxx,
>that shows the problem (using data from VTKData)?
>I'm not clear on how you connect/relate the 2D ipw to the corresponding
3D >ipw.

>Dean





More information about the vtkusers mailing list