<HTML>
<HEAD>
<TITLE>Re: [Paraview] Apply a transform to an ImageData</TITLE>
</HEAD>
<BODY>
<FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>I&#8217;ve never looked at the vtkImageReslice filter before, but it&#8217;s not quite what I had in mind. &nbsp;It looks like the vtkImageReslice filter is rotating the data and then resampling on another axis-aligned regular grid. &nbsp;That certainly has its uses, but in the case of using the ParaView transform filter, the expected behavior is to warp the topology in space.<BR>
<BR>
I gave an example of a filter that could do translations of scaling of vtkImageData by adjusting the origin and spacing, respectively, for building a simple plugin in the IEEE Vis09 tutorial (<a href="http://www.paraview.org/Wiki/images/1/11/PV_Vis09_Tut_Plugins_Examples.tar.gz">http://www.paraview.org/Wiki/images/1/11/PV_Vis09_Tut_Plugins_Examples.tar.gz</a>). &nbsp;Something similar could be done for the x,y,z arrays in a vtkRectilinearGrid.<BR>
<BR>
That said, a more practical implementation is probably to convert the vtkImageData or vtkRectilinearGrid to a vtkStructuredGrid and feed that to the transform filter. &nbsp;That would be the only way to warp the grid by arbitrary rotations.<BR>
<BR>
-Ken<BR>
<BR>
<BR>
On 11/8/10 4:25 PM, &quot;David Doria&quot; &lt;<a href="daviddoria@gmail.com">daviddoria@gmail.com</a>&gt; wrote:<BR>
<BR>
</SPAN></FONT><BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>On Mon, Nov 8, 2010 at 4:35 PM, Moreland, Kenneth &lt;<a href="kmorel@sandia.gov">kmorel@sandia.gov</a>&gt; wrote:<BR>
&gt; In general, this is not a great solution.  Clean to Grid converts to<BR>
&gt; unstructured grid, and that provides a heck of a lot of overhead.<BR>
&gt;<BR>
&gt; A better solution would be to convert to a curvilinear grid.  An even better<BR>
&gt; solution would be if the transform filter were smart enough to transform<BR>
&gt; images.  Unfortunately, neither of these are implemented in ParaView,<BR>
&gt; although either would be really easy to do.  I submitted a suggestion to<BR>
&gt; ParaView UserVoice, so go vote for it if you want to transform images:<BR>
&gt;<BR>
&gt; <a href="http://paraview.uservoice.com/forums/11350-general/suggestions/1206709-transform-filter-should-work-on-all-types-of-data">http://paraview.uservoice.com/forums/11350-general/suggestions/1206709-transform-filter-should-work-on-all-types-of-data</a><BR>
&gt;<BR>
&gt; -Ken<BR>
<BR>
You have my vote(s). Would you plan to use the vtkImageReslice filter?<BR>
If you have any thoughts/implementations, I'd be happy to be a second<BR>
pair of eyes.<BR>
<BR>
David<BR>
<BR>
<BR>
</SPAN></FONT></BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
</SPAN></FONT><FONT SIZE="2"><FONT FACE="Consolas, Courier New, Courier"><SPAN STYLE='font-size:10pt'><BR>
&nbsp;&nbsp;&nbsp;**** &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Kenneth Moreland<BR>
&nbsp;&nbsp;&nbsp;&nbsp;*** &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sandia National Laboratories<BR>
*********** &nbsp;<BR>
*** *** *** &nbsp;email: <a href="kmorel@sandia.gov">kmorel@sandia.gov</a><BR>
** &nbsp;*** &nbsp;** &nbsp;phone: (505) 844-8919<BR>
&nbsp;&nbsp;&nbsp;&nbsp;*** &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;web: &nbsp;&nbsp;<a href="http://www.cs.unm.edu/~kmorel">http://www.cs.unm.edu/~kmorel</a><BR>
</SPAN></FONT></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
</SPAN></FONT>
</BODY>
</HTML>