[Insight-developers] RE: Displacement fields

Luis Ibanez ibanez@cs.unc.edu
Wed, 21 Feb 2001 14:28:45 -0500


Jim,

We have discussed some of the trade-offs for representing
displacement fields and came up with the following options:

A. Discrete sampling of the displacement field (in N-D)
1- N-D itkImage with pixels of type vnl_vector
2- N-Ditk Image with pixels of type itkVector

B. Base representation of the displacement field
- those are basically the family of Splines, for which
  we only need to keep the parameters that define
  the spline.

---------

(A) is the easiest representation from the programming
point of view.  But it has a cost on memory.

for example, a 3D Image of 512x512x100 will take

A.1 with vnl_vectors<float> = (3x4bytes + 8 bytes) each => 524 Mb
A.2 with itkVectors<float> = (3x4 bytes) each => 314 Mb

so, for (A), and image of itkVectors seems to be better.


(B) is has lower requirements in memory but will cost
in computing time.  The memory is basically what the
control points (or in general, the set of spline parameters)
take.

Let's say that for a set of 100.000 control points (itkPoints<float>)
in 3D, along with the displacement vectors defined in their
positions (itkVectors<float>) the memory used will be:

3x4 x 2 x 100.000 = 2.4 Mb

The computing cost will vary from method to method, but
 in any case will be paid each time a displacement vector
needs to be known for a particular position.

-------

One solution is to create a base class

    itkDisplacementField

That will have the common API for (A) and (B).
then we derive classes to obtain :

(A) could be called: itkDiscreteDisplacementField
(B) could be called: itkSplineDisplacementField

and probably under (B) we could place a family
of splines. (e.g. TPS )

the API for itkDisplacementField will be restricted
basically to the method:

virtual  itkVector GetVector(  const itkPoint & p ) const;

// Return the displacement vector corresponding
// to a position in physical space


             +--------------------------+
             |   itkDisplacementField   |
             +--------------------------+
                         ^
                         |
                         |
            +------------+----------------+
       (A)  |                             | (B)
 +---------------------------+  +-------------------------+
 | DiscreteDisplacementField |  | SplineDisplacementField |
 +---------------------------+  +-------------------------+
                                          | 
                                   +------+------+ 
                                  TPS     EBS    ...



----------

Taking into account the methods that you are
working on, do you think that your displacement
fields could be appropiately represented by some 
of the classes in this hierarchy ?


Thanks

Luis


=================================


James Gee wrote:

> dear stephen:
> your inquiry about displacement/vector field representations for
> registration during the tcon meeting yesterday initiated a long discussion
> on vectors, etc, but i'm not sure if we managed to resolve the original
> issue you raised.  can those of us working on high-dimensional registration
> methods standardize around a specific representation for
> deformation/displacement fields?
>
> regards,
> jim

--
______________________________________________________________________

Luis Ibanez
Research Assistant Professor - Division of Neurosurgery
University of North Carolina at Chapel Hill
CB# 7060, Chapel Hill, NC 27599
email : ibanez@cs.unc.edu       home  : http://www.cs.unc.edu/~ibanez
phone : (919)-843-9961          fax   : (919)-966-6627
______________________________________________________________________