<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'>Hi,<BR>
&nbsp;<BR>
&nbsp;&nbsp; I am new to vtk and struggling with conversions of images. I need to transform a volume (MRI dataset) using the&nbsp;thin plate spline algorithm. <BR>
&nbsp;<BR>
The volume is read from vtkDICOMImageReader and I have access to a vtkImageData structure. I want to apply the transformation with <FONT size=2>vtkTransformPolyDataFilter, unfortunatly, I get a message specifying I need to give a PolyData structure instead of an image. Does anyone have a solution? Is there a conversion available in vtk? or I am using the transforms in a wrong way?</FONT><BR>
&nbsp;<BR>
Thanks in advance for your help!<BR>
&nbsp;<BR>
&nbsp;<BR>
&nbsp;<BR>
here is the code, if it might be usefull to understand my problem:<BR>
&nbsp;<BR>
____________________________________________________________________________<BR><FONT size=2>
vtkTransformPolyDataFilter *f11 = vtkTransformPolyDataFilter::New ();<BR>
vtkGeneralTransform *t1 = vtkGeneralTransform::New ();<BR>
&nbsp;<BR>
t1-&gt;SetInput (TPSTransfo); <FONT color=#99cc00><FONT color=#008000>// TPSTransfo is of type <FONT size=2>vtkThinPlateSplineTransform</FONT></FONT></FONT><BR>
<FONT color=#99cc00><FONT color=#008000><FONT size=2>&nbsp;<BR></FONT></FONT></FONT>
</FONT><FONT color=#008000 size=2>// reading a dicom series<BR></FONT><FONT size=2>
vtkDICOMImageReader *Reader = vtkDICOMImageReader::New();<BR>
Reader-&gt;SetDirectoryName(mDicomFile.getString());<BR>
Reader-&gt;Update();<BR>
</FONT><FONT color=#0000ff size=2>const</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>char</FONT><FONT size=2> * Name = Reader-&gt;GetPatientName();<BR>
SoDebugError::post( __FILE__, </FONT><FONT color=#800000 size=2>"Patient name is : %s"</FONT><FONT size=2>, Name );<BR>
<BR>
<BR>
&nbsp;<BR>
f11-&gt;SetInput ((vtkDataObject*)Reader-&gt;GetOutput()); <FONT color=#008000>// &lt;- error comes from here. "GetOutput" gives a structure of type vtkImageData </FONT><BR>
f11-&gt;SetTransform (t1);<BR>
f11-&gt;Update ();<BR>
&nbsp;<BR>
&nbsp;<BR>
&nbsp;<BR>
&nbsp;<BR></FONT><br /><hr /> <a href='' target='_new'></a></body>
</html>