[vtkusers] ImplicitModeller and ContourFilter

Christopher.Moore at noaa.gov Christopher.Moore at noaa.gov
Fri Mar 26 16:37:34 EST 2004


Thanks for the try, Pingkun, but simply casting the ImplicitModeller 
didn't work - the output is ImageData (the superclass is already DataSet), 
and when I add the cast:

NIso->SetInput((vtkDataSet*) Nmodeller->GetOutput());

I get the following errors now:

/usr/local/lib/vtk/libvtkHybrid.a(vtkImplicitModeller.o)(.text+0x2f): In 
function `vtkImplicitModeller::CollectRevisions(std::basic_ostream<char, 
std::char_traits<char> >&)':: undefined reference to 
`vtkDataSetToImageFilter::CollectRevisions(std::basic_ostream<char,
std::char_traits<char> >&)'
/usr/local/lib/vtk/libvtkHybrid.a(vtkImplicitModeller.o)(.text+0x4e5): In 
function `vtkImplicitModeller::UpdateData(vtkDataObject*)':: undefined reference 
to `vtkDataSetToImageFilter::GetInput()'
/usr/local/lib/vtk/libvtkHybrid.a(vtkImplicitModeller.o)(.text+0xc15): In 
function `vtkImplicitModeller_ThreadedAppend(void*)':: undefined reference 
to `vtkCellLocator::New()'
/usr/local/lib/vtk/libvtkHybrid.a(vtkImplicitModeller.o)(.text+0xfa6): In 
function `vtkImplicitModeller_ThreadedAppend(void*)':: undefined reference to 
`vtkCellLocator::FindClosestPointWithinRadius(float*, float, float*, 
vtkGenericCell*, int&, int&, float&)'
/usr/local/lib/vtk/libvtkHybrid.a(vtkImplicitModeller.o)(.text+0x19c8): In 
function `vtkImplicitModeller::Append(vtkDataSet*)':: undefined reference 
to `vtkStructuredGrid::New()'

Does anyone have any ideas?

Cheers,
Chris

On Fri, 26 Mar 2004, Yan Pingkun wrote:

> vtkImageData is derived from vtkDataSet. So you can call the function
> like this:
> NIso->SetInput((vtkDataSet*) Nmodeller->GetOutput());
> This is caused by the strong type checking character of C++. Sometimes
> it may help us from being trapped by errors.
> 
> TCL is a script language. It doesn't match the data type strictly.
> Hence, there's no warning or error on it.
> 
> My two cents.
> 
> Pingkun
> 
> -----Original Message-----
> From: vtkusers-admin at vtk.org [mailto:vtkusers-admin at vtk.org] On Behalf
> Of Christopher.Moore at noaa.gov
> Sent: Friday, March 26, 2004 9:15 AM
> To: vtkusers at vtk.org
> Subject: [vtkusers] ImplicitModeller and ContourFilter
> 
> 
> 
> This is odd:
> 
> Now that ImplicitModeller is a DataSetToImageFilter, my ContourFilter 
> complains, but only in C++, not Tcl:
> 
>   vtkVectorText *letterN = vtkVectorText::New();
>   letterN->SetText("N");
> 
>   vtkImplicitModeller *Nmodeller = vtkImplicitModeller::New();
>   Nmodeller->SetInput(letterN->GetOutput());
>   Nmodeller->SetMaximumDistance(0.2);
>   Nmodeller->SetSampleDimensions(64, 64, 64);
>   Nmodeller->SetAdjustDistance(.5);
> 
>   vtkContourFilter *NIso = vtkContourFilter::New();
>   NIso->SetInput(Nmodeller->GetOutput());
>   NIso->SetValue(1, .1);
> 
> compiler error:
> 
> CreateCompass.cxx:138: no matching function for call to 
> `vtkContourFilter::SetInput(vtkImageData*)'
> /usr/local/include/vtk/vtkDataSetToPolyDataFilter.h:44: candidates are: 
> virtual void vtkDataSetToPolyDataFilter::SetInput(vtkDataSet*)
> 
> but if I run Examples/Modelling/Tcl/hello.tcl, it seems to run fine with
> 
> the same ContourFilter input (vtkImplicitModeller GetOutput).
> 
> Am I missing something?  How do I use ImplicitModeller with
> ContourFilter?  
> Why does it work when wrapped in Tcl?
> 
> Cheers,
> Chris
> 
> __________________________________________________________________
> Christopher Moore                email: Christopher.Moore at noaa.gov
> Research Scientist, Oceanography                 tel: 206.526.6779
> University of Washington/JISAO/NOAA-PMEL         fax: 206.526.6744
> ------------------------------------------------------------------
> 
> 




More information about the vtkusers mailing list