<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’ve never looked at the vtkImageReslice filter before, but it’s not quite what I had in mind. It looks like the vtkImageReslice filter is rotating the data and then resampling on another axis-aligned regular grid. 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>). 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. 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, "David Doria" <<a href="daviddoria@gmail.com">daviddoria@gmail.com</a>> 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 <<a href="kmorel@sandia.gov">kmorel@sandia.gov</a>> wrote:<BR>
> In general, this is not a great solution. Clean to Grid converts to<BR>
> unstructured grid, and that provides a heck of a lot of overhead.<BR>
><BR>
> A better solution would be to convert to a curvilinear grid. An even better<BR>
> solution would be if the transform filter were smart enough to transform<BR>
> images. Unfortunately, neither of these are implemented in ParaView,<BR>
> although either would be really easy to do. I submitted a suggestion to<BR>
> ParaView UserVoice, so go vote for it if you want to transform images:<BR>
><BR>
> <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>
><BR>
> -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>
**** Kenneth Moreland<BR>
*** Sandia National Laboratories<BR>
*********** <BR>
*** *** *** email: <a href="kmorel@sandia.gov">kmorel@sandia.gov</a><BR>
** *** ** phone: (505) 844-8919<BR>
*** web: <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>