[Insight-developers] itkIndex & itkOffset

Stephen R. Aylward aylward@unc.edu
Tue, 03 Apr 2001 14:39:01 -0400


Again - how about changing itkIndex back to signed?

Isn't that what we decided before?

s

Joshua Cates wrote:
> 
> Hello all,
> 
> Now that itkIndex has been changed to unsigned and there is a
> signed itkOffset class, we need to establish the definitions
> and relationship between the two classes in very concrete terms.
> 
> The documentation for itkOffset defines it as the difference between two
> itkIndex's, but the implementation of itkIndex does not support this
> definition. Currently all arithmetic operations between two itkIndex
> return itkIndex. This is no longer appropriate.
> 
> If itkOffset is the difference btwn two itkIndex it follows that:
> 
>  itkIndex - itkIndex  = itkOffset
>  itkIndex - itkOffset = itkIndex
>  itkIndex + itkOffset = itkIndex
>  itkIndex + itkIndex  = itkOffset? itkIndex? or undefined?
> 
> Another issue is whether to check the itkIndex - itkOffset case for
> negative results, which will produce undefined values in itkIndex.
> What do others think?
> 
> Josh.
> 
> ______________________________
>  Josh Cates
>  School of Computer Science
>  University of Utah
>  Email: cates@cs.utah.edu
>  Phone: (801) 587-7697
>  URL:   www.cs.utk.edu/~cates
> 
> _______________________________________________
> Insight-developers mailing list
> Insight-developers@public.kitware.com
> http://public.kitware.com/mailman/listinfo/insight-developers

-- 
===============================================
Stephen R. Aylward
Assistant Professor of Radiology
Adjunct Assistant Professor of Computer Science
http://www.cs.unc.edu/~aylward
aylward@unc.edu
(919) 966-9695