[vtkusers] Problem with 'vtkThreshold'
Amy Squillacote
ahs at cfdrc.com
Thu Nov 13 09:33:00 EST 2008
You don't need to do any casting. Just do #include "vtkUnstructuredGrid.h".
- Amy
Björn Zehner wrote:
> Hello,
> I am not sure if you need to explicitely downcast. Did you include
> both, vtkUnstructuredGrid.h and vtkDataObject.h?
>
> else try:
> gf->SetInput(vtkUnstructuredGrid::SafeDownCast(thresholdEdgels->GetOutput()));
>
> else I don't know.
> Kind regards and good luck,
> Bjoern
>
> ----- Ursprüngliche Nachricht -----
> Von: Nour Mestiri <nourmestiri at yahoo.fr>
> Datum: Donnerstag, 13. November 2008, 10:44
> Betreff: Re: [vtkusers] Problem with 'vtkThreshold'
> An: Björn Zehner <bjoern.zehner at ufz.de>
> Cc: vtk <vtkusers at vtk.org>
>
>
> > Hi,
> > I knew that i can resolve the problem using the 'SafeDownCast'
> function. How can i do this?
> > Thanks
>
> > --- En date de : *Jeu 13.11.08, "Björn Zehner"
> /<bjoern.zehner at ufz.de>/* a écrit :
>
> > De: "Björn Zehner" <bjoern.zehner at ufz.de>
> > Objet: Re: [vtkusers] Problem with 'vtkThreshold'
> > À: nourmestiri at yahoo.fr
> > Cc: "vtk" <vtkusers at vtk.org>
> > Date: Jeudi 13 Novembre 2008, 9h15
>
> > Hi,
> > sometimes I get this kind of error if an include is missing. In
> your case that
> > would be #include "vtkDataObject.h"
> > Kind regards,
> > Bjoern
>
> > ----- Ursprüngliche Nachricht -----
> > Von: Nour Mestiri <nourmestiri at yahoo.fr>
> > Datum: Mittwoch, 12. November 2008, 18:55
> > Betreff: [vtkusers] Problem with 'vtkThreshold'
> > An: vtk <vtkusers at vtk.org>
>
>
> > > Hi all vtk users.
> > > I have a problem with 'vtkThreshold' class.
> > > I want to use the output of a 'vtkThreshold ' as the input of
> a 'GeometryFilter'.
> > > I do this:
> > > vtkThreshold *thresholdEdgels = vtkThreshold::New();
> > > ...
> > > ...
> > > vtkGeometryFilter *gf = vtkGeometryFilter::New();
> > > gf->SetInput(thresholdEdgels->GetOutput());
>
> > > When i this this code, i have this error:
> > > cannot convert parameter 1 from 'class vtkUnstructuredGrid *'
> to 'class vtkDataObject *'
>
> > > How should i do to rectify this?
> > > Thanks a lot
>
>
>
> > > _______________________________________________
> > > This is the private VTK discussion list.
> > > Please keep messages on-topic. Check the FAQ at:
> > > http://www.vtk.org/Wiki/VTK_FAQFollow this link to
> > > subscribe/unsubscribe:http://www.vtk.org/mailman/listinfo/vtkusers
>
> >
> -------------------------------------------------------------------------
>
> > Dr. Bjoern Zehner
> > UFZ Centre for Environmental Research Leipzig-Halle
> > Permoserstrasse 15
> > 04318 Leipzig
> > Germany
> > http://www.ufz.de/index.php?en=5673
> > Tel: ++49 (341) 235 1979
> > Fax: ++49 (341) 235 1939
>
>
>
>
>
>
> -------------------------------------------------------------------------
> Dr. Bjoern Zehner
> UFZ Centre for Environmental Research Leipzig-Halle
> Permoserstrasse 15
> 04318 Leipzig
> Germany
> http://www.ufz.de/index.php?en=5673
> Tel: ++49 (341) 235 1979
> Fax: ++49 (341) 235 1939
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> 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
>
--
Amy Squillacote Phone: (256) 726-4839
Computer Scientist Fax: (256) 726-4806
CFD Research Corporation Web: http://www.cfdrc.com
215 Wynn Drive, Suite 501
Huntsville, AL 35805
More information about the vtkusers
mailing list