<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META content="MSHTML 5.00.3502.5390" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>hi all,</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>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. </FONT></DIV>
<DIV><FONT face=Arial size=2>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.
</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>here's the cpp- code that works fine with
vtk4.0:</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial
size=2>/////////////////////////////////////////////////////////////////////////</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2> dsReader =
vtkDataSetReader::New();<BR> dsReader->SetFileName("E:\\geo.vtk");<BR> <BR> doReader
=
vtkDataObjectReader::New();<BR> doReader->SetFileName("E:\\att.vtk");<BR> doReader->Update();</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2> cArrayName =
doReader->GetOutput()->GetFieldData()->GetArray(0)->GetName();<BR> <BR> mdof
=
vtkMergeDataObjectFilter::New();<BR> mdof->SetInput(dsReader->GetOutput()
);<BR> mdof->SetDataObject(doReader->GetOutput() );</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2> fd2ad =
vtkFieldDataToAttributeDataFilter::New();<BR> fd2ad->SetInput(mdof->GetOutput()
);<BR> fd2ad->SetScalarComponent(0, cArrayName, 0);</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2> dsMapper =
vtkDataSetMapper::New();<BR> dsMapper->SetInput(fd2ad->GetOutput()
);</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial
size=2>//////////////////////////////////////////////////////////////////////////////<BR></DIV></FONT>
<DIV><FONT face=Arial size=2><FONT face=Arial size=2>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? </FONT></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>many thanks in advance</FONT></DIV>
<DIV><FONT face=Arial size=2>Joseph</DIV></FONT></BODY></HTML>