[vtkusers] Bug in vtkImagePlaneWidget? Input extent is modified !
Florian Pierron
F.Pierron at exeter.ac.uk
Tue Apr 26 12:31:16 EDT 2005
Hi all !
I'm using vtkImagePlaneWidget and it was working properly before I
updated to a new vtk version. For info, the versions are taken from cvs,
the old one is VTK_4.5.0_2004-03-25 and the new one is VTK_4.5.0_2005-02-28.
Here is my code :
planeWidgetX->SetInput (volumeData);
planeWidgetX->SetPlaneOrientationToXAxes ();
planeWidgetX->SetSliceIndex (100);
planeWidgetX->SetPicker (pickerPlaneWidget);
planeWidgetX->GetPlaneProperty ()->SetColor (0,1,0);
planeWidgetX->GetSelectedPlaneProperty ()->SetColor (0,1,0);
planeWidgetX->SetLeftButtonAction (vtkImagePlaneWidget::CURSOR_ACTION);
planeWidgetX->SetLeftButtonAutoModifier
(vtkImagePlaneWidget::NO_MODIFIER);
planeWidgetX->SetRightButtonAction (vtkImagePlaneWidget::CURSOR_ACTION);
planeWidgetX->SetRightButtonAutoModifier
(vtkImagePlaneWidget::NO_MODIFIER);
planeWidgetX->GetMarginProperty()->SetOpacity (0);
planeWidgetX->GetCursorProperty()->SetOpacity (0);
planeWidgetX->SetInteractor (iren3DView2);
planeWidgetX->PlaceWidget ();
planeWidgetY->SetInput (volumeData);
planeWidgetY->SetPlaneOrientationToYAxes ();
planeWidgetY->SetSliceIndex (100);
planeWidgetY->SetPicker (pickerPlaneWidget);
planeWidgetY->GetPlaneProperty ()->SetColor (0,1,0);
planeWidgetY->GetSelectedPlaneProperty ()->SetColor (0,1,0);
planeWidgetY->SetLeftButtonAction (vtkImagePlaneWidget::CURSOR_ACTION);
planeWidgetY->SetLeftButtonAutoModifier
(vtkImagePlaneWidget::NO_MODIFIER);
planeWidgetY->SetRightButtonAction (vtkImagePlaneWidget::CURSOR_ACTION);
planeWidgetY->SetRightButtonAutoModifier
(vtkImagePlaneWidget::NO_MODIFIER);
planeWidgetY->GetMarginProperty()->SetOpacity (0);
planeWidgetY->GetCursorProperty()->SetOpacity (0);
planeWidgetY->SetInteractor (iren3DView2);
planeWidgetY->PlaceWidget ();
With the new vtk version, I have the following error :
vtkImagePlaneWidget (018CD5C0): Invalid Y extent. Perhaps the input
data is empty?
I checked inside the planeWidgetY->SetPlaneOrientationToYAxes ()
function and I was suprised to have a bad extent value when doing
this->ImageData->GetWholeExtent(extent); (extent[0] is equal to
extent[1] !!!). So I checked the extent value of my volumeData and I was
really suprised that the value is not the same before planeWidgetX->On
() and after it ! This function changes the wholeExtent of my volumeData
! I think it shouldn't have this behaviour (I checked with the old vtk
version and my volumeData extent doesn't change), and even if I set back
the extent to my volumeData, it crashes during the rendering process as
if the extent was shared between volumeData and planeWidgetX.
I guess there's a pb when updating to the new vtk pipeline (ImageReslice
?) or maybe vtkImageWidget works in a new way now ... any advice on this
pb would be really nice. Maybe my question is related to the previous
email from jiang-gx but I couldn't find any answer to his question :
Subject: [vtkusers] why the Extent information changed in the
vtkImageThreshold class?
Date: Wed, 8 Dec 2004 20:23:38 +0800
From: jiang-gx <jxjx at sjtu.edu.cn>
Another quick question, I've read somewhere in an old vtk post that by
setting opacity to 0 to the vtkImagePlane's margin, it won't allow the
plane to rotate because the margin is not pickable. But I can rotate it
! How can I disable the rotation ?
Thank you,
Florian
More information about the vtkusers
mailing list