[vtkusers] Error with extent

Sergio Andres sergio at unizar.es
Wed Sep 1 10:17:08 EDT 2004


Thanks for your answer.
But I didn't manage to fix the problem.

Actually, I use vtkImageViewer2, which contains a vtkImageActor and
a vtkImageMapToWindowLevelColors to generate a unsigned char image,
which is the input to the vtkImageActor.

So, I call to vtkImageViewer2::SetInput(image), with the output image 
from vtkImagePlaneWidget.
(vtkImageData *  GetResliceOutput () ).

The problem comes up when the input 3D image to the vtkImagePlaneWidget 
is changed.
I call again to the SetInput() method with the output from the widget, 
which has the following extents:
whole extent: 0,255, 0,7, 0,0
extent and updateExtent: 0,255, 0,15, 0,0
And this looks strange... ???
So, the output from widget is connected to the viewer....

Then I tried to set the extent manually with 
vtkImageActor::SetDisplayExtent(image->GetWholeExtent()),
but there is no difference.
Perhaps because the input to this class is the output from 
vtkImageMapToWindowLevelColors...

I hope this explanation can help you to help me.
It seems to be a problem with updating of extents...

Thanks in advance.
Sergio




Veerapuram Varadhan escribió:

>Hi,
>
>Does the vtkImageActor that you use to load the 2D slice is a newly
>created one or you are re-using it?
>
>In case, if you are reusing an already created vtkImageActor by just
>setting a new input to it, you have to update the extent of the actor
>as well.
>
>try using vtkImageActor::SetDisplayExtent(), before rendering.
>
>HTH,
>
>V. Varadhan.
>
>On Wed, 01 Sep 2004 14:32:23 +0200, Sergio Andres <sergio at unizar.es> wrote:
>  
>
>>Hi all,
>>
>>I got an error from vtk : "Update extent does not lie within whole
>>extent", but I don't know how to fix it.
>>
>>First, I build a new 3D vtkImageData, and then I use vtkImageReslice to
>>get a new 2D slice.
>>It is this slice which causes the error, since it is the input to a
>>vtkImageActor.
>>Before rendering, the image extents seems to have the right values, but
>>after rendering
>>this values are different and the error comes up (the renderer modifies
>>these values...??)
>>
>>Has anyone a solution?
>>
>>Thanks!
>>Sergio
>>
>>_______________________________________________
>>This is the private VTK discussion list.
>>Please keep messages on-topic. Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
>>Follow this link to subscribe/unsubscribe:
>>http://www.vtk.org/mailman/listinfo/vtkusers
>>
>>    
>>
>
>  
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20040901/703d5fb0/attachment.htm>


More information about the vtkusers mailing list