<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7638.1">
<TITLE>RE: [vtkusers] how to get output from a vtkTransformFilter ? </TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->
<BR>

<P><FONT SIZE=2>Hi,<BR>
I am not an expert in VTK just a normal user so my opinion may be wrong.One problem I see is to use an instance of vtkPoints which is an abstract class,I guess the output of the filter must be assigned to some concrete instance of any of a class derived from vtkPoints such as vtkPolyData.<BR>
This is how I normally do this kind of stuff<BR>
<BR>
<BR>
vtkTransformFilter* tf= vtkTransformFilter::New();<BR>
vtkPolyData* data=vtkPolyData::New();//this polydata contains the points which you need to change<BR>
vtkPolyData* result=vtkPolyData::New();<BR>
......//Apply changes to the the transform instance<BR>
.....<BR>
.....<BR>
vtkTranformPolyDataFilter * pdf= vtkTranformPolyDataFilter::New();<BR>
pdf-&gt;SetInput(data);<BR>
pdf-&gt;SetTransform(tf);<BR>
pdf-&gt;Update();<BR>
<BR>
result= pdf-&gt;GetOutput();<BR>
<BR>
result contains the changed version of data you can use GetPoints method to get changed points<BR>
<BR>
This is how I do it and I am sure there must be some more elegant and short way to do it .<BR>
<BR>
Regards<BR>
M.Salman<BR>
University of Surrey,U.K.<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>
<BR>
<BR>
<BR>
-----Original Message-----<BR>
From: vtkusers-bounces+m.salman=surrey.ac.uk@vtk.org on behalf of Emmanouil Moschidis<BR>
Sent: Thu 03/05/2007 3:09 PM<BR>
To: vtkusers@vtk.org<BR>
Subject: [vtkusers] how to get output from a vtkTransformFilter ?<BR>
<BR>
Hi<BR>
i am using a vtkTransformFilter to change the coordinates of some points. I apply the filter to the points and then i want to get the output but when the following line is executed:<BR>
<BR>
vtkPoints *Tdata=Tf-&gt;GetOutput()-&gt;GetPoints(); //Tf is the vtkTransformFilter<BR>
<BR>
i get this error:<BR>
<BR>
ERROR: In /Users/antoinerosset/VTK/Filtering/vtkDemandDrivenPipeline.cxx, line 635 vtkStreamingDemandDrivenPipeline (0x17bc1e50): Algorithm vtkTransformFilter(0x1e61a790) did not create output for port 0 when asked by REQUEST_DATA_OBJECT and does not specify a concrete DATA_TYPE_NAME.<BR>
<BR>
<BR>
Does Anyone know what's wrong? Is there any other way of getting output (the modified points) from a vtkTransformFilter?<BR>
thanks<BR>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>
---------------------------------<BR>
Ahhh...imagining that irresistible &quot;new car&quot; smell?<BR>
&nbsp;Check outnew cars at Yahoo! Autos.<BR>
<BR>
</FONT>
</P>

</BODY>
</HTML>