[Insight-users] Fwd: Registering vector images

Luis Ibanez luis.ibanez at kitware.com
Wed Apr 6 12:36:51 EDT 2005


Hi Rupert,


1) Determining the pixel type of the image at run time:


    This topic has been discussed a number of times in
    the list. You basically have to do the following:

      a) interrogate your ImageIO class in order to know
         the real pixel type of your image in the file.
      b) anticipate what pixel types you want to support
         and instantiate readers for each one, plus a
         cast image filter in order to convert them to a
         unique pixel type
      c) use a swith statemen controlled by the answert to (a)
         and put all the instantiations of (b) in the case:
         places.



2) Image registration of vector images is possible but you
    will have to write ImageMetrics for it.  The rest of the
    components will work on Vector images.  Note that you will
    have only one choice of VectorImage interpolator:

http://www.itk.org/Insight/Doxygen/html/classitk_1_1VectorLinearInterpolateImageFunction.html


     In order to start easy with writing your image metrics
     you may want to follow any of the existing ImageMetrics
     (MeansSquare is and easy one to start), and only implement
     the GetValue() method.  If you use an optimizer that doesnt'
     require derivatives (e.g. Amoeba or OnePlusOne) you will be
     able to have a first registration runnning.

     If you don't implement the GetDerivative methods you will
     get the default from the superclass, which is using finite
     differences in order to estimate derivativees.  That may
     or may not be good depending on the nature of your metric.


     If you are willing to contribute your metric to the toolkit
     we will be happy to assit you in putting this new class(es)
     into the CVS repository



   Regards,


      Luis



---------------------
Rupert Brooks wrote:

> Hi,
> 
> Two quick questions
> 
> I am doing some experiments with image registration, and would like to
> register some images with a vector of values at each pixel.  I have
> some problems - and would like to get the advice of the list of how to
> proceed.
> 
> The first question is pretty simple - is there a way to have a program
> load different image types at run time.  All the examples in the book
> specify the pixel type at compile time.  I'd like to have the program
> look at the file, and determine its pixel type, then proceed
> accordingly.  So the program would react differently when faced with a
> grayscale vs an RGB image.  Ideally  i would like to be able to switch
> dimensionality at run-time too, but i would settle for image pixel
> type.
> 
> The second question is more philosophical.  It appears that there is a
> parallel set of classes appearing in ITK to handle vector images
> (itkVectorLinearInterpolator, etc).  There do not appear to be image
> metrics there as yet.  What is ITKs approach to the registration of
> vector-valued images.  Is anyone working on this?  I know that some
> people have used ITK for Landsat registration, for example.
> 
> Thanks
> Rupert B.
> 
> 
> --
> --------------------------------------------------------------
> Rupert Brooks
> McGill Centre for Intelligent Machines (www.cim.mcgill.ca)
> Ph.D Program in Intelligent Systems
> http://www.cyberus.ca/~rbrooks
> 
> 





More information about the Insight-users mailing list