[vtkusers] Please HELP - vtkWidgets

Bartlomiej Wilkowski wilku_83 at o2.pl
Tue Dec 5 08:19:26 EST 2006


Hello,

I am preparing the application which creates the 3dmodel from the set of the proceeding images, and then I would like to use widgets to cut the model in x, y, z direction and to show the output of the cutting not only on the widget plane(it is automatic, and it is working) but also on the separate panel (i use vtkImageViewer) of my GUI(let´s call it "panel image").

For the widget in the z-plane, the "panel image" is correct, the same as the image on the widget.
Unfortunately for the y- and x- plane widgets the "panel images" are distorted. I found that unexpectedly the dimensions of these images are changed. Initially the images are 512x512 pixels, but for the x and y plane widgets, y coordinates changes to 256 or 128 pixels. I must state that the strangest is that on the cutting plane I can see normal, not distorted image, but the "panel image is distorted.

Anybody knows what can cause such a situation?

Thanks 4 help in advance!

Bartek

below I attach the part of code which works incorrectly...

planeWidget.SetInput(vir.GetOutput());
planeWidget.SetPlaneOrientationToXAxes();  // or planeWidget.SetPlaneOrientationToYAxes(); //in the case of z-axes everyting is ok!
planeWidget.SetOrigin(0,0,0);
planeWidget.SetPoint1(511,0,0);
planeWidget.SetPoint2(0,0,93);
planeWidget.PlaceWidget();
planeWidget.AddObserver("StartInteractionEvent", this, "startInteraction");
planeWidget.AddObserver("EndInteractionEvent", this, "endInteraction");
planeWidget.AddObserver("InteractionEvent", this, "clipResliceRender");
planeWidget.On();

resliceImage = new vtkImageData();
resliceImage = planeWidget.GetResliceOutput();

imageViewerPanel.setImageViewerInput(resliceImage);
imageViewerPanel.setImageViewerColorWindow(3500);
imageViewerPanel.setImageViewerColorLevel(1000);
imageViewerPanel.getRenWin().repaint();





More information about the vtkusers mailing list