[vtkusers] Writing (imaging) algorithm for which output extent has no relation with input extent.

Maarten Beek beekmaarten at yahoo.com
Mon Jan 13 15:45:38 EST 2014


Hi all,

I am trying to write an (image) algorithm that generates a 2d image from a 3d image.
I would like to be able to set the resolution of the 2d image.

The extents of the input and output are therefore unrelated.

I have the algorithm working when I set the algorithm's input in an unofficial way (SetNumberOfInputPorts(0), using a custom function SetInput instead of SetInputConnection or SetInputData). This way there is no pipeline created, which I would like to happen.

I set the whole extent of the algorithm's output to the desired (2d) extent in RequestInformation. However, the function vtkStreamingDemandDrivenPipeline::VerifyOutputInformation() fails because this whole extent miraculously gets re-set to whole (3d) extent of the input.

I have tried to prevent this check using outInfo->Set(vtkStreamingDemandDrivenPipeline::UNRESTRICTED_UPDATE_EXTENT(), 1) and
outInfo->Set(vtkStreamingDemandDrivenPipeline::EXACT_EXTENT(), 0) to no avail.


How do I prevent the adjustment of the whole extent after I have set it to the desired value?

Thanks - Maarten
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20140113/48cde767/attachment.html>


More information about the vtkusers mailing list