[vtkusers] vtkImagePlaneWidget, segmentation fault
dean.inglis at camris.ca
dean.inglis at camris.ca
Wed Oct 8 22:42:50 EDT 2003
Eric,
Being the primary contributor of this widget, I also ran the test
you and Mathieu defined. So far I am stumped! Curiously,
scaling the widget (middle button + shift key), spinning and rotating
do not crash the program, only pushing the plane or translating a margin
edge (middle button + ctrl key). Peppering with printfs
shows that the crash occurs during the call to the widget's
interactor to render in OnMouseMove: this->Interactor->Render();
BTW, I tested with data defined as:
for(int k=0;k<nPoints;k++)
{
traceArray->SetTuple1(k, vtkMath::Random()*255); //trace[k]
fractionalAnisotropy->SetTuple1(k, k/2); //FA[k]
}
which is easy to visualize without adjusting window/level
and set the widget up as follows (no need for an external picker):
<snip>
vtkImagePlaneWidget *axialSlice = vtkImagePlaneWidget::New();
axialSlice->DisplayTextOn();
axialSlice->TextureInterpolateOff();
axialSlice->SetInput( data );
axialSlice->SetInteractor( iren );
axialSlice->SetPlaneOrientationToZAxes();
axialSlice->SetSliceIndex( dim[2]/2 );
axialSlice->On();
ren1->ResetCameraClippingRange();
renWin->Render();
<snip>
Using a vtkImageCast vtkImageActor pipeline also worked fine with this
data. I am wonderig if there is something going on with the vtkImageReslice
that is internal to vtkImagePlaneWidget.
My build is latest VTK cvs, Borland C++ Builder 5, MinSizeRel,
CMake 1.8.1 on Win2k, NVidia GeForce Ti, Intel P4. Anyone
have any ideas?
Dean
More information about the vtkusers
mailing list