<!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 there,</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>i have problem that has allready been dealt
with some time before in this archive, but nevertheless my code won't work.
maybe someone can tell me what i'm doing wrong.</FONT></DIV>
<DIV><FONT face=Arial size=2>all right, here is my problem: i have a geometry
(unstructured grid) and a lot of time steps of scalar data. now i want to read
the geometry once and then merge it with some attribute-data of a special
timestep.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>following the answers in the archives i created one
unstructured grid *.vtk file and a lot of fielddata- files containing the
scalar- values of each timestep. now i wanted to mergethe geometry and a
scalarfile with 'vtkMergeDataObjectFilter'. i did so using:</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>// m_reader: DataSetReader<BR>// doReader:
DataObjectReader</FONT></DIV>
<DIV><FONT face=Arial size=2> </FONT></DIV>
<DIV><FONT face=Arial
size=2> vtkMergeDataObjectFilter
*mdof;</FONT></DIV>
<DIV><FONT face=Arial
size=2> vtkFieldDataToAttributeDataFilter
*fd2ad;</FONT></DIV>
<DIV><FONT face=Arial size=2> vtkDataSetMapper
*dMapper;</FONT></DIV>
<DIV><FONT face=Arial size=2> </FONT><FONT face=Arial
size=2>
...</FONT></DIV>
<DIV><FONT face=Arial size=2> mdof =
vtkMergeDataObjectFilter::New();<BR>
mdof->SetInput(m_reader->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->SetOutputAttributeDataToPointData();<BR>
fd2ad->SetScalarComponent(0, "scalar0", 0);</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2> dMapper =
vtkDataSetMapper::New();<BR>
dMapper->SetInput(fd2ad->GetOutput() );</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>the scalar- files are formated like:</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2> # vtk DataFile
Version 2.0 <BR> Scalardata
<BR> ASCII <BR>
FIELD time0 1<BR> scalar0 1 3470
float<BR>
6.300000E+02<BR>
6.300000E+02<BR>
6.300000E+02<BR> ...</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>now there is no compiler error (vcpp6.0), and the
program runs. but it only shows the geometry, no scalar information. and i get
the error:</FONT></DIV>
<DIV><FONT face=Arial size=2> error:
vtkFieldDataToAttributeDataFilter (0x09D1B940): Can't find array/component
requested</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>does anybody now where i'm wrong? How else should i
run SetScalarComponent, or is there something complete different to
use?</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>thank u all.</FONT></DIV>
<DIV> </DIV>
<DIV> </DIV></BODY></HTML>