<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:12pt">Yes, it has an internal pipeline. Apologies for not mentioning this, thought I did, must have been in an earlier email to the mailinglist...<br><br>I started with the vtkWindowToImageFilter class, but now taking data directly from an internal renderwindow because I want floats instead of unsigned chars.<br>I don't make a ShallowCopy of the output, instead I create the data in RequestDataObject(). I do call Render() on the internal renderwindow in RequestData().<br><br>Basically I am trying to make a nice drr generator algorithm using the gpu mapper in vtk.<br><br>Maarten<div style="display: block;" class="yahoo_quoted"> <br> <br> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 12pt;"> <div style="font-family: HelveticaNeue,
Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 12pt;"> <div dir="ltr"> <font size="2" face="Arial"> On Tuesday, January 14, 2014 11:07:21 AM, David Gobbi <david.gobbi@gmail.com> wrote:<br> </font> </div> <div class="y_msg_container">Your filter has an internal pipeline? That would have been worth<br clear="none">mentioning in your first email.<br clear="none"><br clear="none">Are you doing a shallow copy to copy the output of the internal<br clear="none">pipeline to the output of your filter? Does your RequestData() method<br clear="none">call the Update() method of the internal pipeline?<br clear="none"><div class="yqt9978884127" id="yqtfd63973"><br clear="none">On Tue, Jan 14, 2014 at 8:42 AM, Maarten Beek <<a shape="rect" ymailto="mailto:beekmaarten@yahoo.com" href="mailto:beekmaarten@yahoo.com">beekmaarten@yahoo.com</a>> wrote:<br clear="none">> Thanks David,<br clear="none">><br
clear="none">> Just before reading your email, I already added<br clear="none">> inInfo->Get(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT(), inExt);<br clear="none">> inInfo->Set(vtkStreamingDemandDrivenPipeline::UPDATE_EXTENT(), inExt, 6);<br clear="none">> to the code in RequestUpdateExtent() and that caused the errors to<br clear="none">> disappear. But it is good to see it seems to work in another filter too ;-)<br clear="none">><br clear="none">> Something is still wrong in the algorithm code though, because I need to<br clear="none">> call Update() to get a sensible output. Without it, the output disappears<br clear="none">> from the renderwindow after a new render (although the algorithm's<br clear="none">> RequestData is called...?)<br clear="none">><br clear="none">> Maybe vtkImageHistogram will give me a clue, although I don't see an<br clear="none">> internal pipeline in it...<br
clear="none">><br clear="none">> Maarten<br clear="none">><br clear="none">><br clear="none">> On Tuesday, January 14, 2014 9:58:09 AM, David Gobbi <<a shape="rect" ymailto="mailto:david.gobbi@gmail.com" href="mailto:david.gobbi@gmail.com">david.gobbi@gmail.com</a>><br clear="none">> wrote:<br clear="none">> Hi Maarten,<br clear="none">><br clear="none">> In order to set the output extent independent of the input extent,<br clear="none">> all you should have to do is override RequestInformation() and<br clear="none">> RequestUpdateExtent(). It is definitely not necessary to set<br clear="none">> UNRESTRICTED_UPDATE_EXTENT or EXACT_EXTENT.<br clear="none">> Take a look at vtkImageHistogram.cxx as an example of a filter<br clear="none">> that has a 3D input and an independently-sized 2D output.<br clear="none">><br clear="none">> David<br clear="none">><br clear="none">> On Mon, Jan
13, 2014 at 1:45 PM, Maarten Beek <<a shape="rect" ymailto="mailto:beekmaarten@yahoo.com" href="mailto:beekmaarten@yahoo.com">beekmaarten@yahoo.com</a>> wrote:<br clear="none">>> Hi all,<br clear="none">>><br clear="none">>> I am trying to write an (image) algorithm that generates a 2d image from a<br clear="none">>> 3d image.<br clear="none">>> I would like to be able to set the resolution of the 2d image.<br clear="none">>> The extents of the input and output are therefore unrelated.<br clear="none">>><br clear="none">>> I have the algorithm working when I set the algorithm's input in an<br clear="none">>> unofficial way (SetNumberOfInputPorts(0), using a custom function SetInput<br clear="none">>> instead of SetInputConnection or SetInputData). This way there is no<br clear="none">>> pipeline created, which I would like to happen.<br clear="none">>><br clear="none">>>
I set the whole extent of the algorithm's output to the desired (2d)<br clear="none">>> extent<br clear="none">>> in RequestInformation. However, the function<br clear="none">>> vtkStreamingDemandDrivenPipeline::VerifyOutputInformation() fails because<br clear="none">>> this whole extent miraculously gets re-set to whole (3d) extent of the<br clear="none">>> input.<br clear="none">>> I have tried to prevent this check using<br clear="none">>><br clear="none">>> outInfo->Set(vtkStreamingDemandDrivenPipeline::UNRESTRICTED_UPDATE_EXTENT(),<br clear="none">>> 1) and<br clear="none">>> outInfo->Set(vtkStreamingDemandDrivenPipeline::EXACT_EXTENT(), 0) to no<br clear="none">>> avail.<br clear="none">>><br clear="none">>> How do I prevent the adjustment of the whole extent after I have set it to<br clear="none">>> the desired value?<br clear="none">>><br
clear="none">>> Thanks - Maarten<br clear="none">><br clear="none">><br clear="none"></div><br><br></div> </div> </div> </div> </div></body></html>