[vtkusers] Problem with vtkImageReslice
David Gobbi
dgobbi at atamai.com
Tue Nov 1 16:54:13 EST 2005
Øystein Skotheim wrote:
>On Tue, 1 Nov 2005, David Gobbi wrote:
>
>DG> Hi Øystein,
>
>DG> I saw a similar error once, and it was because my application was
>DG> setting the DisplayExtent of a vtkImageActor incorrectly. Since
>DG> vtkImageViewer2 uses vtkImageActor, I suspect that this is the same
>DG> problem.
>
>DG> In your callback, get rid of reslice->Update() and replace it with
>DG> this:
>
>DG> ImageViewer->UpdateDisplayExtent()
>
>Thank you for the advice. The problem is that this method is protected
>(although the documentation says it's public!)
>
>
The reason the error occurs is that Reslice is changing its output
extent whenever
the direction cosines change, since AutoCropOutputOutputOn() is set.
The ImageActor
doesn't like this.
If you use SetOutputExtent() for reslice to specify a particular output
extent, I bet that
the problem will go away.
According to the header file, UpdateDisplayExtent() is public, so I'm
not sure what
the issue with that is.
- David
More information about the vtkusers
mailing list