[vtkusers] Buffered Reading of vti File

Karthik Krishnan karthik.krishnan at kitware.com
Tue Apr 9 04:56:20 EDT 2013


You can do a buffered reading with VTK xml image formats since a while in
VTK, including 5.8... here's how. Turn off whole slices and set the update
extent on the output.

vtkXMLImageDataReader *reader = vtkXMLImageDataReader::New();
reader->SetFileName( "in.vti" );
reader->GetOutput()->SetUpdateExtent( 0, 799, 0, 599, 0, 499 );
reader->SetWholeSlices(0);
reader->Update();

--
karthik


On Thu, Apr 4, 2013 at 8:10 PM, Kevin H. Hobbs <hobbsk at ohio.edu> wrote:

> On 04/02/2013 08:52 PM, Grant McAuley wrote:
> > 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.
> >
>
> Looks like you're right. SetUpdateExtent is defined in vtkAlgorithm in
> 6.0 and not in 5.8.
>
> I've never set the extent on a reader anyway. I always do what I
> suggested in the first place:
>
> reader -> clip -> whatever
>             ^
>          [extent]
>
>
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>


-- 
karthik
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20130409/d54e8352/attachment.htm>


More information about the vtkusers mailing list