[vtkusers] vtkMergeDataObjectFilter in vtk4.2.x
    mccoy 
    j.mccoy at gmx.de
       
    Thu Jul 24 04:44:18 EDT 2003
    
    
  
hi all,
some time ago i posted a question regarding the difference of data aquiring in vcpp and tcl. in detail i wasn't able to merge a geometryfile and an attributefile together using vtkMergeDataObjectFilter in cpp (i allways got 'can't find array/component requested') , but in tcl it worked fine. 
finally i found out  that the tcl-vtk  environment is still 4.0, but for vcpp i used vtk4.2.2. i downloaded the vtk4.0 source, compiled it and rebuild my vcpp- code and now it also works. 
here's the cpp- code that works fine with vtk4.0:
/////////////////////////////////////////////////////////////////////////
 dsReader = vtkDataSetReader::New();
 dsReader->SetFileName("E:\\geo.vtk");
 
 doReader = vtkDataObjectReader::New();
 doReader->SetFileName("E:\\att.vtk");
 doReader->Update();
 cArrayName = doReader->GetOutput()->GetFieldData()->GetArray(0)->GetName();
 
 mdof = vtkMergeDataObjectFilter::New();
 mdof->SetInput(dsReader->GetOutput() );
 mdof->SetDataObject(doReader->GetOutput() );
 fd2ad = vtkFieldDataToAttributeDataFilter::New();
 fd2ad->SetInput(mdof->GetOutput() );
 fd2ad->SetScalarComponent(0, cArrayName, 0);
 dsMapper = vtkDataSetMapper::New();
 dsMapper->SetInput(fd2ad->GetOutput() );
//////////////////////////////////////////////////////////////////////////////
does anybody know, how to use vtkMergeDataObjectFilter in vtk4.2? do i have to change my code (if yes: how? ) or the format of the vtk- data file? 
many thanks in advance
Joseph
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20030724/d968be00/attachment.htm>
    
    
More information about the vtkusers
mailing list