[vtkusers] vtkImageStencil
David Gobbi
dgobbi at irus.rri.ca
Fri Jan 18 02:40:21 EST 2002
Hi David,
It doesn't work, it was never implemented (though you guessed that much).
It probably won't be implemented any time soon, because AFAIK I'm the
only person who is likely to do it. You can try implementing it yourself
if you want, the vtkImageStencilExecute() function in vtkImageStencil.cxx
isn't very complicated. Just change the
"for (idX = cr1; idX <= cr2; idX++)" loop so that it copies from the
background image, just like the "for (idX = r1; idX <= r2; idX++)"
loop already copies from the foreground image.
Also you might try using a stencil with vtkImageBlend, it might be able
to do what you need without any modification.
- David
--
David Gobbi, MSc dgobbi at irus.rri.ca
Advanced Imaging Research Group
Robarts Research Institute, University of Western Ontario
On Fri, 18 Jan 2002, David Netherway wrote:
> Hello vtkusers,
>
> I tried to use this method vtkImageStencil-> SetBackgroundImage following
> the examples TestStencilWithImage.tcl and TestStencilWithFunction.tcl
> and only read the "not yet implemented" note in the documentation printed
> below after the following error message apperaed:
> vtkImageStencil (0x02CD11A0): Execute: BackgroundInput must have the same
> WholeExtent as the Input.
> This is the same error message that TestStencilWithFunction.tcl gives.
>
> The documentation states:
> NOTE: Not yet implemented, use SetBackgroundValue instead. Set the second
> input. This image will be used for the 'outside' of the stencil. If not set,
> the output voxels will be filled with BackgroundValue instead.
>
> Is this supposed to work (because there is an example using it)? Has anyone
> implemented this yet? Is it being worked on at present?
>
> Thanks, David
>
>
> _______________________________________________
> 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://public.kitware.com/mailman/listinfo/vtkusers
>
More information about the vtkusers
mailing list