[Insight-developers] ImageFunction class

Joshua Cates cates at cayenne.cs.utah.edu
Thu Oct 19 20:43:31 EDT 2000


Hello Lydia,

We have checked tools into the repository that are designed to do the
types of things that you describe.  The difference is that our tools are
optimized for sequential processing and not random access (although random
access is possible).

Basically what we have is this:  

- An image iterator that references a pixel neighborhood.  You could
subclass this to a random access iterator.

- A set of operations on pixel neighborhoods like convolution, inner
product, addition, subtraction, etc.

- Some predefined operators that can be applied to pixel neighborhoods to
calculate special values (derivative operators, gaussian smoothing,
dilation, erosion,...). We would like to develop with others a large set
of these operators for doing common tasks like you describe.

Take a look at the neighborhood iterators and neighborhood operators and
let me know if you think they can do what you need.  Then we should
probably talk about a unified approach with the basic architecture folks.

Josh.

(I sent an email out early last week with more info about the
neighborhood tools which I can forward to you.)



+--+--+--+--+--+--+--+--+--+--+--+--
 Josh Cates			
 Department of Computer Science	
 University of Utah
 Email: cates at cs.utah.edu
 Phone: (801) 587-7697
 URL:   www.cs.utk.edu/~cates
--+--+--+--+--+--+--+--+--+--+--+---

On Thu, 19 Oct 2000, Lydia Ng wrote:

> Hi,
>  
> For my algorithm I need to calculate values such as the curvature 
> at a particular point. It would be good to do this using something 
> much lighter weight than a process object. 
> 
> The two main reasons are: 
> 1) I may only want to calculate the curvature 
> at specific pixels where the algorithm hasn't 
> converged yet, or 
> 2) because of memory constraints, I may not want to 
> store the curvature for every pixel in the image. 
> I just want to use it at each pixel and then throw it 
> away. 
> 
> I am implementing light weight class called ImageFunction, 
> templated over 
> 
> a) the pixel type of the image to be processed, 
> 
> c) the pixel type for the output. 
> 
> b) the dimension of the image and 
> 
> template<class TInputPixel, class TOutputPixel,
> 	unsigned int VImageDimension = 2> 
> class ImageFunction 
> { 
>         ... 
> }; 
> 
> Like an ImageIterator, ImageFunction would be initialized 
> with an input image and keeps a reference to the image. 
> 
> The API would have a function 
>   
> TOutputPixel Evaluate(Index& index); 
> 
> which will return the value of that function at a 
> particular pixel. 
> 
> Depending on the function, it may be able to return 
> values at non-integer coordinates eg: 
> 
> TOutputPixel Evaluate(double * coord); 
> 
> With this, I can have a ImageCurvature subclass which 
> calculates the curvature at a requested location. 
> Other possibilities include 
> interpolation, upwind derivatives etc. 
> 
> So not to duplicate efforts,
> have any of you got a similar class already?
> 
> Cheers, 
> Lydia 
> 
> 
> _______________________________________________
> Insight-developers mailing list
> Insight-developers at public.kitware.com
> http://public.kitware.com/mailman/listinfo/insight-developers
> 





More information about the Insight-developers mailing list