[Paraview] Creating ImageData w/Programmable Source

Eric E. Monson emonson at cs.duke.edu
Tue Feb 10 15:40:58 EST 2009


That works great -- thanks!

Now that you pointed me in the right direction, I can see how both  
WholeExtent and UpdateExtent were [0, -1, 0, -1, 0, -1]  in the output  
with my original script. Maybe it should have been obvious, but I  
didn't know enough to look for that.

It also seems to work fine if I set these in the main script:

pdo.SetWholeExtent(0,9,0,9,0,9)
pdo.SetUpdateExtentToWholeExtent()

Thanks again,
-Eric


On Feb 10, 2009, at 3:13 PM, Berk Geveci wrote:

> It should be something like:
>
> from paraview import util
> util.SetOutputWholeExtent(self, [0, 10, 0, 10, 0, 10])
>
> Make sure that you are putting this in the RequestInformation script.
> I think in the future, we should have a widget with six entry boxes...
>
> -berk
>
> On Tue, Feb 10, 2009 at 2:31 PM, Eric E. Monson  
> <emonson at cs.duke.edu> wrote:
>> Nope -- I have no idea how to do that. Could you give me some  
>> guidance?
>>
>> I really appreciate it,
>> -Eric
>>
>>
>> On Feb 10, 2009, at 12:50 PM, Berk Geveci wrote:
>>
>>> Did you set the whole extent in the RequestInformation script?
>>>
>>> -berk
>>>
>>> On Fri, Feb 6, 2009 at 11:28 AM, Eric E. Monson  
>>> <emonson at cs.duke.edu>
>>> wrote:
>>>>
>>>> Hello,
>>>>
>>>> I'm having trouble creating vtkImageData with the Python  
>>>> Programmable
>>>> Source. The PolyData Helix example works fine for me, but when I  
>>>> try to
>>>> create ImageData it seems to build the data structure within  
>>>> Python (i.e.
>>>> I
>>>> can print the characteristics of the ImageData and it looks fine  
>>>> in the
>>>> Output Messages), but no data shows in the Information tab or the  
>>>> 3d
>>>> render
>>>> view.
>>>>
>>>> Here's the simplest case of the things I've tried (after selecting
>>>> vtkImageData from the combo box):
>>>>
>>>> pdo = self.GetImageDataOutput()
>>>> pdo.SetDimensions(10,10,10)
>>>> pdo.SetOrigin(0,0,0)
>>>> pdo.SetSpacing(1,1,1)
>>>> print pdo
>>>>
>>>> I can add scalars to it, or create a new vtkImageData and then  
>>>> shallow or
>>>> deep copy that over to the output, and those things look like  
>>>> they're
>>>> working fine at the print statement, but they don't seem to help  
>>>> get the
>>>> data to really show up in the pipeline.
>>>>
>>>> I hope someone can just point out something I'm forgetting to do...
>>>> (PV 3.4 & CVS, OS X 10.5.6 & WinXP)
>>>>
>>>> Thanks,
>>>> -Eric
>>>>
>>>> ------------------------------------------------------
>>>> Eric E Monson
>>>> Duke Visualization Technology Group
>>>>
>>>>
>>>> _______________________________________________
>>>> ParaView mailing list
>>>> ParaView at paraview.org
>>>> http://www.paraview.org/mailman/listinfo/paraview
>>>>
>>
>>



More information about the ParaView mailing list