<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.&nbsp; Here is the code:<br>
&nbsp;<br>
&nbsp; vtkDataSetReader *vectorData = vtkDataSetReader::New();<br>
&nbsp;&nbsp;&nbsp;
vectorData-&gt;SetFileName(&quot;data/office.vtk&quot;);<br>
&nbsp;&nbsp;&nbsp; vectorData-&gt;Update();<br>
&nbsp;<br>
vtkOutlineFilter *vectorOutline = vtkOutlineFilter::New();<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
vectorOutline-&gt;SetInput(vectorData);<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
vectorOutline-&gt;Update();<br>
&nbsp;<br>
When I do that, I receive the following error:<br>
&nbsp;<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-&gt;SetInput(vectorData-&gt;GetOutput());<br><br>
- Amy<br><br>
<br>
<blockquote type=cite class=cite cite>&nbsp;<br>
I thought that it would be logical to use
vtkDataObjectToDataSetFilter.&nbsp; (mistakenly perhaps)<br>
&nbsp;<br>
vtkDataSetReader *vectorData = vtkDataSetReader::New();<br>
&nbsp;&nbsp;&nbsp;
vectorData-&gt;SetFileName(&quot;data/office.vtk&quot;);<br>
&nbsp;&nbsp;&nbsp; vectorData-&gt;Update();<br>
&nbsp;<br>
vtkDataObjectToDataSetFilter() *vectorSet =
vtkDataObjectToDataSetFilter::New();<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
vectorSet-&gt;SetInput(vectorData-&gt;GetOutput());<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
vectorSet-&gt;Update();<br>
&nbsp;<br>
vtkOutlineFilter *vectorOutline = vtkOutlineFilter::New();<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
vectorOutline-&gt;SetInput(vectorSet-&gt;GetOutput());<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
vectorOutline-&gt;Update();<br>
&nbsp;<br>
When I do that, I receive the following error:<br>
&nbsp;<br>
error C2248: 'vtkDataObjectToDataSetFilter::vtkDataObjectToDataSetFilter'
: cannot access protected member declared in class
'vtkDataObjectToDataSetFilter'<br>
&nbsp;<br>
Errors seem to be unrelated to data (I have tried at least 8 different
sets).&nbsp; Any ANY ANY Help would be greatly appreciated,<br>
&nbsp;<br>
&nbsp;<br>
&nbsp;<br>
Everette W. Sperling<br>
&nbsp;</font></blockquote></body>
</html>