[vtkusers] X-Y Plots problem

Lledo Museros Cabedo lledo.museros at itc.uji.es
Mon Apr 30 10:03:21 EDT 2007


Dear Saira,

Thank you very much. I have solved the compiler error. But now I have a
new one when linking.
It says:
error LNK2019: extarnal symbol "public: static class vtkXYPlotActor *
__cdecl vtkXYPlotActor::New(void)" (?New at vtkXYPlotActor@@SAPAV1 at XZ) not
solved.

It is in this part of the code:
//Create an xy-plot using the output of the 3 probe filters as input.
// The x-values we are plotting are arc length.
	vtkXYPlotActor *xyplot=vtkXYPlotActor::New();   -----> Here is
the error.
	xyplot->AddInput(probe->GetOutput());
	xyplot->AddInput(probe2->GetOutput());
	xyplot->AddInput(probe3->GetOutput());
    	xyplot->GetPositionCoordinate()->SetValue(0.0,0.67,0);
	.............

Cannot I create a vtkXYPlotActor like this? 
Does anyone knows this linking problem?

Thank you in advance again.

Best regards,
LLEDO

-----Mensaje original-----
De: Saira Saleem Pathan [mailto:sarakhan_engr at hotmail.com] 
Enviado el: lunes, 30 de abril de 2007 13:21
Para: Lledo Museros Cabedo
CC: vtkusers at vtk.org
Asunto: RE: [vtkusers] X-Y Plots problem

hi
Apply Casting Function :)
Read from Documentation ,how to convert one data type to another, if
solve then let  me know otherwise i will send u code :)





<DIV>
<P><STRONG><FONT color=#0000ff>Saira Saleem Pathan</FONT></STRONG><IMG 
height=2 src="http://graphics.hotmail.com/greypixel.gif" width="100%" 
vspace=9></P>
<P> Ph.D. Student</P>
<P>Univerity of Leeds </P>
United Kingdom.





>From: "Lledo Museros Cabedo" <lledo.museros at itc.uji.es>
>To: <vtkusers at vtk.org>
>Subject: [vtkusers] X-Y Plots  problem
>Date: Mon, 30 Apr 2007 12:51:45 +0200
>
>Hello,
>
>I am new using VTK, therefore I am reading the VTK books and trying to
>do examples. I have written the example xyPlot.tcl (which is in
>VTK/Examples/Annotation/TCl/) in C++, and now I have a compiler error
>which I do not know how to solve. The error says that
>'vtkProbeFilter::SetSource' : cannot translate the parameter from
>'vtkStructuredGrid *' to 'vtkDataObject *'. I have read the doxygen
>manuals and in fact SetSource needs as parameter a vtkDataObject but
>GetOutput from a vtkPLOT3DReader returns a vtkStructuredGrid.
>
>I send the part of the code pointing out where the error is:
>
>//
>// Create a PLOT3D reader and load the data.
>//
>
>vtkPLOT3DReader *pl3d=vtkPLOT3DReader::New();
>pl3d->SetXYZFileName("C:/VTKData/Data/combxyz.bin");
>pl3d->SetQFileName("C:/VTKData/Data/combq.bin");
>pl3d->SetScalarFunctionNumber(100);
>pl3d->SetVectorFunctionNumber(202);
>pl3d->Update();
>
>// Create three the line source to use for the probe lines.
>vtkLineSource *line=vtkLineSource::New();
>line->SetResolution(30);
>
>// Move the line into place and create the probe filter. For
>vtkProbeFilter, // the probe line is the input, and the underlying data
>set is the source.
>
>vtkTransform *transL1=vtkTransform::New();
>transL1->Translate(3.7, 0.0, 28.37);
>transL1->Scale(5,5,5);
>transL1->RotateY(90);
>vtkTransformPolyDataFilter *tf=vtkTransformPolyDataFilter::New();
>tf->SetInputConnection(line->GetOutputPort());
>tf->SetTransform(transL1);
>vtkProbeFilter *probe=vtkProbeFilter::New();
>probe->SetInputConnection(tf->GetOutputPort());
>probe->SetSource(pl3d->GetOutput());   ----> In this line is the ERROR.
>
>Can anyone help me?
>
>Thank you in advance.
>
>Best regards,
>LLEDO
>
>
>
>
>_______________________________________________
>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

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!

http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/




More information about the vtkusers mailing list