[vtkusers] can't find function
Mathieu Malaterre
mathieu.malaterre at kitware.com
Sat Jul 31 07:56:34 EDT 2004
Mac,
Have a look at the FAQ:
http://www.vtk.org/Wiki/VTK_FAQ#Forward_declaration_in_VTK_4.x
This is exactly your problem ;)
HTH
Mathieu
> Hello dear list members!
>
> I'm using an implicit modeller to generate a scalar field around
> a sort of stick figure I made (which is simply a collection of points and
> lines in a vtkPolyData object), and then using vtkContourFilter to
> generate an isosurface from that scalar field (which is, I believe,
> generated as vtkImageData.
>
> I was inspired to do this by the hello.tcl example, and the little program
> I wrote works perfectly *in* tcl. I need to port it over to c++, and it's
> there that I'm running into problems.
>
> Here is the relevent c++ code: (awData is the stick figure)
>
> vtkImplicitModeller * imp = vtkImplicitModeller::New();
> imp->SetInput( awData );
> imp->SetSampleDimensions( 80, 80, 256 ); //resolution
> imp->SetMaximumDistance( 4 ); //perimiter of calculation
> imp->SetModelBounds( -15, 20, -5, 5, -1.0, 50.0 );
>
> vtkContourFilter * contour = vtkContourFilter::New();
> contour->SetInput( imp->GetOutput() );
> contour->SetValue( 0, 1.0 );
> vtkPolyDataMapper * impMapper = vtkPolyDataMapper::New();
> impMapper->SetInput( contour->GetOutput() );
> impMapper->ScalarVisibilityOff();
>
> However! I get this funky compile-time error:
>
> /imports/archive/u1/uaf/cowell/airway/airway.cxx:113: no matching function
> for
> call to `vtkContourFilter::SetInput(vtkImageData*)'
> /imports/projects/UAFINSP/vtk-src/Filtering/vtkDataSetToPolyDataFilter.h:44:
> candidates
> are: virtual void vtkDataSetToPolyDataFilter::SetInput(vtkDataSet*)
>
> Am I just setting up the pipeline wrong? It works fine in tcl:
>
> vtkContourFilter contour
> contour SetInput [imp GetOutput]
>
> anyway, your help is desperately needed and appreciated!
> thanks!
>
> Mac Cowell
> Summer Intern
> Arctic Region Supercomputing Center
> Fairbanks, AK
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
More information about the vtkusers
mailing list