[Paraview] Apply a transform to an ImageData

Moreland, Kenneth kmorel at sandia.gov
Tue Nov 9 10:59:55 EST 2010


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.

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 (http://www.paraview.org/Wiki/images/1/11/PV_Vis09_Tut_Plugins_Examples.tar.gz).  Something similar could be done for the x,y,z arrays in a vtkRectilinearGrid.

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.

-Ken


On 11/8/10 4:25 PM, "David Doria" <daviddoria at gmail.com> wrote:

On Mon, Nov 8, 2010 at 4:35 PM, Moreland, Kenneth <kmorel at sandia.gov> wrote:
> In general, this is not a great solution.  Clean to Grid converts to
> unstructured grid, and that provides a heck of a lot of overhead.
>
> A better solution would be to convert to a curvilinear grid.  An even better
> solution would be if the transform filter were smart enough to transform
> images.  Unfortunately, neither of these are implemented in ParaView,
> although either would be really easy to do.  I submitted a suggestion to
> ParaView UserVoice, so go vote for it if you want to transform images:
>
> http://paraview.uservoice.com/forums/11350-general/suggestions/1206709-transform-filter-should-work-on-all-types-of-data
>
> -Ken

You have my vote(s). Would you plan to use the vtkImageReslice filter?
If you have any thoughts/implementations, I'd be happy to be a second
pair of eyes.

David




   ****      Kenneth Moreland
    ***      Sandia National Laboratories
***********
*** *** ***  email: kmorel at sandia.gov
**  ***  **  phone: (505) 844-8919
    ***      web:   http://www.cs.unm.edu/~kmorel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20101109/f7a5ffef/attachment.htm>


More information about the ParaView mailing list