[vtkusers] Re: small error using vtkImagePlaneWidget?

Mark Wyszomierski markww at gmail.com
Sun Apr 15 17:19:37 EDT 2007


Hi Dean,

I'm a bit worried now - I shouldn't be using the reslice member of the
widget? I thought it is completely valid - all that's happening is the
reslice member has its reslice cosines set to the orientation of the
plane widget itself - this is how it is used in the VTK example I
think.

If I make my own reslice, won't I just be doing the same exact thing -
on the interaction callback set the reslice cosines from the plane
widget orientation etc and just get the output? What will the
difference be?

Thanks for your help,
Mark


On 4/15/07, dean.inglis at camris.ca <dean.inglis at camris.ca> wrote:
> 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