[vtkusers] Re: small error using vtkImagePlaneWidget?
dean.inglis at camris.ca
dean.inglis at camris.ca
Sun Apr 15 17:01:16 EDT 2007
Mark,
this is because the widget does not
make the input image data as part of a
regular pipeline. The widget is NOT a filter,
just a widget for viewing and manipulating
the view of it. If you really want to reslice the
data, use a separate vtkImageReslice and pipeline.
This has been done with most vtk widgets: they
are just observers. So, this brings up an
important design issue with widgets: should we
allow access to the inner widget "pipeline"
and if so, then widgets should maintain
proper pipeline input connections etc. otherwise,
there should be no API access to intermediate
data.
Dean
> Subject: small error using vtkImagePlaneWidget?
>
> Hi,
>
> I've set up a pipeline between vtkImagePlaneWidget and vtkImageData.
> It looks like this:
>
> vtkImageData* pImgData = pPlaneWidget->GetResliceOutput();
> pImgData->Update();
> pImageViewer2->SetInput(pImageData);
>
> This works it most cases. I can spin the plane widget using the mouse
> as is setup by default. When I spin the plane close to 90 degrees, I
> get a VTK error as soon as Update() is called on pImgData:
>
> ERROR: In .\vtkStreamingDemandDrivenPipeline.cxx, line 667
> vtkStreamingDemandDrivenPipeline (05306378): The update extent
> specified in the information for output port 0 on algorithm
> vtkImageReslice(052DB2A8) is 0 511 0 63 0 0, which is outside the
> whole extent 0 255 0 63 0 0.
>
> I don't understand how the extents are not matching when the plane is
> spun at this certain angle - I'm not modifying anything, just letting
> the pipeline do the work. Any idea as to what I've done wrong here?
>
> Thanks,
> Mark
>
More information about the vtkusers
mailing list