<html>
<body>
At 11:42 PM 3/1/2004, Everette W. Sperling wrote:<br>
<blockquote type=cite class=cite cite><font face="arial" size=2>I am
trying to visualize some vector data using Visual C++ with
vtkOutlineFilter. Here is the code:<br>
<br>
vtkDataSetReader *vectorData = vtkDataSetReader::New();<br>
vectorData->SetFileName("data/office.vtk");<br>
vectorData->Update();<br>
<br>
vtkOutlineFilter *vectorOutline = vtkOutlineFilter::New();<br>
vectorOutline->SetInput(vectorData);<br>
vectorOutline->Update();<br>
<br>
When I do that, I receive the following error:<br>
<br>
error C2664: 'SetInput' : cannot convert parameter 1 from 'class
vtkDataSetReader *' to 'class vtkDataSet *' Types pointed to are
unrelated; conversion requires reinterpret_cast, C-style cast or
function-style cast<br>
</font></blockquote><br>
You want to pass the output of the vtkDataSetReader to the
vtkOutlineFilter, not the reader itself. Change <font size=2>the SetInput
line to the following:<br>
</font><font face="arial" size=2>vectorOutline->SetInput(vectorData->GetOutput());<br><br>
- Amy<br><br>
<br>
<blockquote type=cite class=cite cite> <br>
I thought that it would be logical to use
vtkDataObjectToDataSetFilter. (mistakenly perhaps)<br>
<br>
vtkDataSetReader *vectorData = vtkDataSetReader::New();<br>
vectorData->SetFileName("data/office.vtk");<br>
vectorData->Update();<br>
<br>
vtkDataObjectToDataSetFilter() *vectorSet =
vtkDataObjectToDataSetFilter::New();<br>
vectorSet->SetInput(vectorData->GetOutput());<br>
vectorSet->Update();<br>
<br>
vtkOutlineFilter *vectorOutline = vtkOutlineFilter::New();<br>
vectorOutline->SetInput(vectorSet->GetOutput());<br>
vectorOutline->Update();<br>
<br>
When I do that, I receive the following error:<br>
<br>
error C2248: 'vtkDataObjectToDataSetFilter::vtkDataObjectToDataSetFilter'
: cannot access protected member declared in class
'vtkDataObjectToDataSetFilter'<br>
<br>
Errors seem to be unrelated to data (I have tried at least 8 different
sets). Any ANY ANY Help would be greatly appreciated,<br>
<br>
<br>
<br>
Everette W. Sperling<br>
</font></blockquote></body>
</html>