[Paraview] Volumes of Interest

Jean M. Favre jfavre at cscs.ch
Thu Feb 18 08:06:03 EST 2010


Natalie Happenhofer wrote:
> Another topic - selecting volumes of interest: I can do that for one file, and it works well. But is it really necessary to repeat this procedure for every file I open in Paraview? Is it possible to select a volume of interest and for every file I open afterward, just this VoI is displayed?
>
>   
I would suggest doing this in Python in order to avoid reading the full
resolution dataset by default. When opening a file, paraview forces you
to click Apply before you can do anything else (such as creating an
Extract Subset filter). Thus, the data reader uses
UPDATE_EXTENT=WHOLE_EXTENT and you may run out of memory before being
able to subset the grid.

if instead, you instantiate your reader, do not execute it, do not
create a representation for it, then create an Extract Subset with the
VOI you desire, and then execute the whole thing, you will end-up
passing the VOI extents upstream directly to the reader, and your reader
will only execute once with the correct extents.

Use the python shell and the followin example:

reader = XMLImageDataReader( FileName= '/path/to/data/foo.vti'] )
reader.PointArrayStatus = ['data1']

ExtractSubset1 = ExtractSubset()

ExtractSubset1.VOI = [2000, 2255, 2000, 2255, 2000, 2255]

DataRepresentation2 = Show(ExtractSubset1)

Render()

Jean--
Swiss National Supercomputing Center


More information about the ParaView mailing list