[vtk-developers] ImagePermute and ImageReslice

Charles Law charles.law at kitware.com
Tue Jun 18 08:14:56 EDT 2002


At 04:05 PM 6/17/2002 -0400, David Gobbi wrote:
>Hi Charles,
>
>You're definitely right that vtkImageReslice makes for an ugly
>superclass.  Sizewise, vtkImageReslice is pretty nasty.  How about
>if a base class was broken off from vtkImageReslice that
>contained just the flip/permute/resample engine?  This would
>also help to clean up vtkImageReslice a bit.

I don't not know what the best Architecture would be, but this suggestion 
seems better.
You also mentioned the pad filters.  Would padding have to be in this 
supper class too?

>Kind of along the same lines of how to best simplify the imaging
>pipelin, a huge number of filters simply map a each input voxel
>through a function to get each output voxel.
>
>All of these filters loop over the pixels in exactly the same manner,
>resulting in a lot of duplicated code (less so now that iterators
>have been introduced).
>
>Why can't these filters simply have a method that will generate a
>'pixel in -> pixel out' function  e.g.
>
>     Func(void *inPtr, void *outPtr)
>
>and have all of the looping handled by the superclass?

If this could be done and keep the same performance, it might be nice.

Charles.





More information about the vtk-developers mailing list