[vtkusers] vtkOutlineFilte Problem

Everette W. Sperling ewsperling at earthlink.net
Mon Mar 1 23:42:54 EST 2004


I am trying to visualize some vector data using Visual C++ with
vtkOutlineFilter.  Here is the code:
 
  vtkDataSetReader *vectorData = vtkDataSetReader::New();
    vectorData->SetFileName("data/office.vtk");
    vectorData->Update();
 
vtkOutlineFilter *vectorOutline = vtkOutlineFilter::New();
            vectorOutline->SetInput(vectorData);
            vectorOutline->Update();
 
When I do that, I receive the following error:
 
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
 
I thought that it would be logical to use vtkDataObjectToDataSetFilter.
(mistakenly perhaps)
 
vtkDataSetReader *vectorData = vtkDataSetReader::New();
    vectorData->SetFileName("data/office.vtk");
    vectorData->Update();
 
vtkDataObjectToDataSetFilter() *vectorSet =
vtkDataObjectToDataSetFilter::New();
            vectorSet->SetInput(vectorData->GetOutput());
            vectorSet->Update();
 
vtkOutlineFilter *vectorOutline = vtkOutlineFilter::New();
            vectorOutline->SetInput(vectorSet->GetOutput());
            vectorOutline->Update();
 
When I do that, I receive the following error:
 
error C2248:
'vtkDataObjectToDataSetFilter::vtkDataObjectToDataSetFilter' : cannot
access protected member declared in class 'vtkDataObjectToDataSetFilter'
 
Errors seem to be unrelated to data (I have tried at least 8 different
sets).  Any ANY ANY Help would be greatly appreciated,
 
 
 
Everette W. Sperling
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20040301/682f47af/attachment.htm>


More information about the vtkusers mailing list