[vtkusers] Buffered Reading of vti File

Kevin H. Hobbs hobbsk at ohio.edu
Wed Mar 27 06:38:50 EDT 2013


On 03/26/2013 11:42 PM, Grant McAuley wrote:
> 
> I will look into this.  However, I hope I didn't muddy the waters
> by mentioning the two simulations. 

No, all that matters is : "How does the pipeline end?" The answer
for you is "you just need the data."

> To simplify and try again: 
> 
> I think all that I need to understand is how to use a reader to
> read a data array in blocks - one block at a time.  You mentioned
> in your first reply:
> 
>>The *.vti reader, vtkXMLImageDataReader, can read the image
> one requested piece at a time
> 
> That sounds exactly like what I need to know.  Eg, if a DataArray
> in the file has 10,000 points, I want to read 0-999, 1000-1999,
> etc.

You need to set up the pieces the way you want them.

If your image is 1D you could do exactly what you want very
easily. I think something like :

reader->SetUpdateExtent( 0,999,0,0,0,0 );
reader->Update();
whatever_you_want_to_do( reader->GetOutput() );
reader->SetUpdateExtent( 1000,1999,0,0,0,0 );
reader->Update();
whatever_you_want_to_do( reader->GetOutput() );

Since you're data is an _image_ it probably isn't 1D.

You will need to calculate the extents that get you the points
you want.

>  I started to look at the source earlier, and will pick it
> up again tomorrow.  In the mean time, any more tips or code
> samples would be appreciated.
> 

Look at the doxygen generated documentation :

http://www.vtk.org/doc/nightly/html/classvtkXMLImageDataReader.html



-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 263 bytes
Desc: OpenPGP digital signature
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20130327/b469e947/attachment.pgp>


More information about the vtkusers mailing list