[vtkusers] What can I do about Smoothing Out of Memory?

Kevin H. Hobbs hobbsk at ohiou.edu
Wed Oct 18 09:19:39 EDT 2006


On Wed, 2006-10-18 at 10:04 +0800, Huang Pengfei wrote:
> Hi Kevin,
>  
> Thanks for your reply! I will look into the relevant classes about
> "streaming".
>  
> However, I don't quite understand the notion of "streaming". Can you
> just introduce a bit more?
>  
> Thank you very much!
>  
> 

Please keep your replies on list ( Cc: vtkusers at vtk.org ).

Streaming means that only a small piece of the whole data-set is ever
loaded into memory at one time. The writer is set to write a certain
number of pieces. For each piece the pipeline calculates what must be
read to write that piece.

Streaming can be as simple as this:

#include "vtkXMLPolyDataReader.h"
#include "vtkXMLPolyDataWriter.h"

int main( int argc, char * argv[] )
{
	vtkXMLPolyDataReader * reader 
		= vtkXMLPolyDataReader::New();
	reader->SetFileName( "file_in.vtp" );

	// You might want to stick a filter here.

	vtkXMLPolyDataWriter * writer 
		= vtkXMLPolyDataWriter::New();
	writer->SetFileName( "file_out.vtp" );
	writer->SetNumberOfPieces( 100 );
	writer->SetInputConnection( reader->GetOutputPort() );

	writer->Update();

	return 0;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20061018/f6150653/attachment.pgp>


More information about the vtkusers mailing list