[vtkusers] vtkDataSetWriter + components
Nico Schlömer
nico.schloemer at gmail.com
Tue Nov 24 13:23:10 EST 2009
Hi,
so I tinkered more with VTK and several data sets that need to go into
one file, and as I couldn't find out how to put the data sets seperately
into a file, I looked into making them components of one (uber) data set.
I tried the following
=========================== *snip* ===========================
vtkDataSetWriter* writer = vtkDataSetWriter::New();
writer->SetFileName("filename.vtk");
writer->SetFileTypeToASCII();
vtkImageAppendComponents * imageAppend =
vtkImageAppendComponents::New();
for (unsigned int k=0; k<numVectors; k++ ) {
// [...] create spData
imageAppend->AddInput(spData);
}
writer->SetInputConnection(imageAppend->GetOutputPort());
writer->Update();
writer->Write();
=========================== *snap* ===========================
and it appears indeed that several components are written to the file,
labeled "Magnitude", "X", "Y" -- how to change this? This is when there
are actually *two* components to the file, and in this case "X" and "Y"
would represent the same data set.
Is there any documentation on this besides doxygen? Examples, maybe?
Cheers,
Nico
More information about the vtkusers
mailing list