[vtkusers] vtkGlyph3D

David Cole david.cole at kitware.com
Mon Jul 18 16:06:13 EDT 2005


This error occurs when there's a missing include file. Check that you 
are including the exact header files for vtkMaskPoints, vtkGlyph3D and 
all of the other specific objects that you are directly using in main.C...

One of them is missing.


HTH,
David


Peter Schmitt wrote:

>vtkusers, 
>
>I am having some goofy problems with vtkGlyph3D::SetInput(vtkDataSet*).
>
>When I call  vtkGlyph3D::SetInput(mask->GetOutput()), I get the
>following error on compile:
>////////////////
>// start snip
>main.C: In function `int main(int, char**)':
>main.C:208: no matching function for call to `vtkGlyph3D::SetInput(vtkPolyData*
>   )'
>/software/linux-sles8-ia32/vtk-nvgl-4.4.2-gcc-r1/include/vtk/vtkDataSetToPolyDataFilter.h:41:
>candidates
>   are: virtual void vtkDataSetToPolyDataFilter::SetInput(vtkDataSet*)
>make: *** [main.o] Error 1
>// stop snip
>///////////////
>
>However, I can compile & execute properly if I run the following
>command instead:
>vtkGlyph3D::SetInput((vtkDataSet*) mask->GetOutput())
>
>Why do I have to manually set my mask as a vtkDataSet?  Is this a bug
>in my program or vtk?  The vtkMaskPoints examples do not manually
>declare a point mask as (vtkDataSet*)  I have included a small code
>fragment at the end of this email.
>
>Thanks,
>Pete
>
>
>// code snip follows:
>
>    vtkUnstructuredGrid* ugrid = vtkUnstructuredGrid::New();
>    //... set data
>
>    /* Set up arrow source that will be used with glyph*/
>    vtkArrowSource *arrow = vtkArrowSource::New();
>
>    /* transform base vector */
>    vtkTransform *scale = vtkTransform::New();
>
>    /* apply the scaling */
>    vtkTransformPolyDataFilter *trans = vtkTransformPolyDataFilter::New();
>    trans->SetTransform(scale);
>    trans->SetInput(arrow->GetOutput());
>
>    /* limit number of vectors to be drawn via a mask */
>    vtkMaskPoints *mask = vtkMaskPoints::New();
>    mask->SetInput(ugrid);
>    mask->SetOnRatio(75);
>    mask->RandomModeOn();
>
>    /* set the glyph using the objects we just set up */
>    vtkGlyph3D *arrows = vtkGlyph3D::New();
>    arrows->SetInput((vtkDataSet*) mask->GetOutput());    // <<<-----
>runs properly
>    //arrows->SetInput(mask->GetOutput());          //   <<< ----
>gives me compile error
>    arrows->SetSource(trans->GetOutput());
>    arrows->SetScaleModeToDataScalingOff();
>    arrows->SetColorModeToColorByVector();
>
>--
>Pete
>_______________________________________________
>This is the private VTK discussion list. 
>Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>Follow this link to subscribe/unsubscribe:
>http://www.vtk.org/mailman/listinfo/vtkusers
>
>  
>



More information about the vtkusers mailing list