<!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>does anybody know if there is a special way to
adress an FieldDataArray by Name in VC++ ? Somehow i allways get the error:
'Can't find array/component requested'. I tried the same code in tcl and it
works fine. </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>here the code i used:</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>tcl:</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>vtkDataSetReader readGeom<BR>
readGeom SetFileName "E:/3p.vtk"<BR></FONT></DIV>
<DIV><FONT face=Arial size=2>vtkDataObjectReader readAttr<BR>
readAttr SetFileName "E:/0scalar.vtk"<BR></FONT></DIV>
<DIV><FONT face=Arial size=2>vtkMergeDataObjectFilter
merge<BR> merge SetInput [readGeom
GetOutput]<BR> merge SetDataObject [readAttr
GetOutput]</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>vtkFieldDataToAttributeDataFilter
fd2ad</FONT></DIV>
<DIV><FONT face=Arial size=2> fd2ad SetInput [merge
GetOutput]<BR> fd2ad
SetOutputAttributeDataToPointData<BR> fd2ad
SetScalarComponent 0 SCALAR_0 0 #
<---------</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>VC++:</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>dsReader =
vtkDataSetReader::New();<BR>dsReader->SetFileName("E:\\3p.vtk");<BR> <BR>doReader
=
vtkDataObjectReader::New();<BR>doReader->SetFileName("E:\\0scalar.vtk");</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>mdof =
vtkMergeDataObjectFilter::New();<BR>mdof->SetInput(dsReader->GetOutput()
);<BR>mdof->SetDataObject(doReader->GetOutput(0) );</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,
"SCALAR_0", 0); // <---------------</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>the Data File containing the FieldData
:</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2># vtk DataFile Version 2.0 <BR>Scalardata <BR>ASCII
<BR>FIELD scalarData 1<BR>SCALAR_0 1 3470
float<BR> 6.300000E+02<BR> 6.300000E+02<BR> 6.300000E+02<BR> 6.300000E+02</FONT></DIV>
<DIV><FONT face=Arial size=2> ...</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>has anybody an idea, why the VC++ code doesn't
work? Many thanks in advanced</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Joseph<BR></DIV></FONT>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2> </DIV></FONT>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2> </DIV></FONT></BODY></HTML>