[vtkusers] Buffered Reading of vti File
Grant McAuley
gmcauley at llu.edu
Tue Apr 2 20:52:38 EDT 2013
Ok, it seems that using vktXMLImageReader::SetUpdateExtent(int extent[6])
requires vtk 6.0 ??? Unless I am missing something, the 5.10 docs show a
SetUpdateExtent() method only available in data classes (as a member of
vtkDataObject) but not eg vtkXMLImageReader. I am using 5.8, but could
try 6.0.
On Wed, Mar 27, 2013 at 3:38 AM, Kevin H. Hobbs <hobbsk at ohio.edu> wrote:
> 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
>
>
>
>
--
Grant McAuley
Postdoctoral Fellow
Radiation Research Labs
Radiation Medicine
Loma Linda University
(909) 558-1000 Ext 85173
gmcauley at llu.edu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20130402/a402b950/attachment.htm>
More information about the vtkusers
mailing list