[Paraview] What part of the pipeline is producing the request for UPDATE_EXTENT?

Mike Jackson imikejackson at gmail.com
Tue Feb 12 22:43:18 EST 2008


I can do that but I don't think it will work.

In paraview, I have managed to set an auto-generated UI for the VOI.  
Now, the user opens our file, RequestInformation is run (I can put  
some sane defaults for the VOI) and things are ok so far. Now the  
user clicks "Apply" and then SetVOI is called with the values from  
the GUI and then RequestData() is called after that. So where do I  
update WHOLE_EXTENT? Or just take the values from the VOI, create a  
vtkImageObject from that, and then just ShallowCopy to the output  
object?

I'm a bit confused at this point. If our case is NOT a standard use  
case for the pipeline than I guess I can look more seriously into  
developing a full blown Plugin for our data file.

Mike

On Feb 12, 2008, at 9:11 PM, Berk Geveci wrote:

> That's not good. You should not set WHOLE_EXTENT() in RequestData().
> Set it to VOI in RequestInformation(). Otherwise, you will run into
> problems sooner or later.
>
> -berk
>
> On 2/12/08, Mike Jackson <imikejackson at gmail.com> wrote:
>> VOI is what the user wants to see.
>>
>> in RequestInformation we have:
>> outInfo->Set( vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT(), this-
>>> DataExtent, 6 );
>>
>> where this->DataExtent is the entire 7000 x 8000 x 200 image size.
>>
>> Then in RequestData() we have the following:
>>
>> outInfo->Set(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT(), this-
>>> VOI, 6);
>>
>>
>> Does that help?
>> mike
>>
>>
>> On Feb 12, 2008, at 4:50 PM, Berk Geveci wrote:
>>
>>> Is the VOI a parameter of the reader? Are you setting the
>>> WHOLE_EXTENT() to VOI?
>>>
>>> On 2/12/08, Mike Jackson <imikejackson at gmail.com> wrote:
>>>> So I think I finally have this working.
>>>>
>>>> In Request Information() I gather the actual full size extents  
>>>> of the
>>>> data set (7000 x 8000 x 200). In the RequestData() method I get  
>>>> what
>>>> the user actually wants (VOI), create a new vtkImageData based  
>>>> on VOI
>>>> information, load the data into the new vtkImageObject, then do an
>>>> output->ShallowCopy(image); just before the return of the  
>>>> RequestData
>>>> Method. Do you see any drawbacks to using this type of approach?
>>>>
>>>> This seems to work as the RequestData() method is only executing  
>>>> once
>>>> now.
>>>>
>>>> The next thing I have to figure out is how to get some labels that
>>>> tell the user just how large their data set it. Probably have to go
>>>> with a Plugin with a custom Qt Panel at this point as I don't  
>>>> see any
>>>> other way of doing it.
>>>>
>>>> In PV 2.6 there used to be ways to get read only properties from a
>>>> custom filter class and present those to the user. Doesn't seem  
>>>> like
>>>> those facilities are there any more with PV 3.x
>>>>
>>>> Thanks for the heads up.
>>>> Mike Jackson
>>>>
>>>> On Feb 12, 2008, at 12:03 PM, Berk Geveci wrote:
>>>>
>>>>> No. UPDATE_EXTENT() is set on the input information during
>>>>> RequestUpdateExtent(). A reader should NOT set UPDATE_EXTENT(). A
>>>>> reader should set WHOLE_EXTENT() in RequestInformation().
>>>>>
>>>>> -berk
>>>>>
>>>>>
>>>>> On 2/12/08, Mike Jackson <imikejackson at gmail.com> wrote:
>>>>>> I was under the impression that I needed to set the UPDATE_EXTENT
>>>>>> like the following in my RequestInformation() method:
>>>>>>
>>>>>> outInfo->Set( vtkStreamingDemandDrivenPipeline::UPDATE_EXTENT(),
>>>>>> this-
>>>>>>> DataExtent, 6 );
>>>>>>
>>>>>> but I think that is a bad assumption for a reader. Is the  
>>>>>> ParaView
>>>>>> pipeline actually setting the UPDATE_EXTENT based on what it
>>>>>> needs to
>>>>>> render?
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Mike Jackson
>>>>>> imikejackson & gmail * com
>>>>>>
>>>>


More information about the ParaView mailing list