[vtkusers] SetWritePiece behaving wrong?
Grothausmann, Roman Dr.
grothausmann.roman at mh-hannover.de
Fri Jan 29 09:04:10 EST 2016
With Joachim's help I figured I first need a way to write VTPs with piece
information in order for vtkXMLPolyDataReader to be able to stream these.
The only working way I found so far is using vtkExtractPolyDataPiece and
vtkXMLPolyDataWriter with SetNumberOfPieces as in:
https://github.com/romangrothausmann/VTK-CLIs/blob/master/vtp2multi-piece_vtp.cxx
Trying to get more equally sized pieces I replaced vtkExtractPolyDataPiece with
vtkOBBDicer / vtkKdTree followed by vtkThreshold / vtkExtractCells:
https://github.com/romangrothausmann/VTK-CLIs/blob/master/dice.cxx
https://github.com/romangrothausmann/VTK-CLIs/blob/master/d3.cxx
This basically seems to work, but writer->SetWritePiece(i) seems to overwrite
former pieces even with writer->SetDataModeToAppended().
How can I get append behaviour or otherwise write a VTP with piece info?
Why does it work with vtkExtractPolyDataPiece?
Any help or hints are very much appreciated
Roman
On 26/11/15 12:19, Grothausmann, Roman Dr. wrote:
> Dear mailing list members,
>
>
> Due to apparent index limitations for arrays I'm in the need to process a
> vtkPolyData in chunks. However, my streaming approach reads and processes all
> data not just sub-extents. Therefore, I tried to write a minimal example of
> streamed reading using vtkXMLPolyDataReader which is supposed to support
> streaming according to the docs. However this simple example seems not to stream:
> https://github.com/romangrothausmann/VTK-CLIs/blob/master/read_SDP.cxx
> I've only found unanswered similar questions on the mailing list and all other
> use of vtkStreamingDemandDrivenPipeline seems to be within a filter not outside.
> Still, on page 14 of 4_VTK-ParallelCompositeAndTime.pdf the same exemplary use
> of vtkStreamingDemandDrivenPipeline is given for "manual" updates.
> Am I missing something in my example or can vtkXMLPolyDataReader not stream?
>
> Any help or hints are very much appreciated
> Roman
>
--
Dr. Roman Grothausmann
Tomographie und Digitale Bildverarbeitung
Tomography and Digital Image Analysis
Institut für Funktionelle und Angewandte Anatomie, OE 4120
Medizinische Hochschule Hannover
Carl-Neuberg-Str. 1
D-30625 Hannover
Tel. +49 511 532-2900
More information about the vtkusers
mailing list