[Insight-users] Problems using Transforms and Filters

Luis Ibanez luis.ibanez@kitware.com
Tue May 4 15:25:19 EDT 2004


Hi Rob,


Welcome to ITK !,



A) About multicolor images:  I assume that you are using RGB or RGBA
    images.  Note that the image metrics available in ITK at this point
    are for escalar images, that is, grayscale images or simply images
    with a single component.  We have performed registration of color
    images by using the two following methods:

    A.1)  Extracting one channel from the color image, for example the
          red channed, and using it as a scalar image for performing
          registration.

    A.2)  Converting the color image into a grayscale image by computing
          a linear combination of its color components.

    Both of this operations can be performed by creating a filter
    that derives from the UnaryFunctorFitler or by using
    ImageAdaptors. You will find a description on how to do this in
    Chapter 12 of the software guide.


    Of course, you could be more creative and do:

    A.3) Implement an image metric customized for color images. In that
         case you should take a look at the actual code of the image to
         image metrics in Insight/Code/Algorithms


BTW, why are you getting color images if you are working with
patients that are being X-rayed ?

Are you using a video camera for taking an external view of the
patient ?

If that's the case, you should rather look into using a motion
detection method such as the DemonsRegistration filter:

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

You should still convert your color images to grayscale, unless
you think that there are valuable information encoded in the color.





B)  We will be more than happy to help you with the problem
     that you have when introducing the threshold filter in
     your program. Unfortunately our divinatory capabilities
     have been seriously deteriorated by excesive use. It will
     therefore be very helpful if you could share with us some
     interesting details of your code such as:

     C.1) The error messages that you get when your program fails.
     C.2) The kind of processing that you are attempting to perform.
     C.3) The mechanism that you used for passing your image to ITK.
     C.4) An actual piece of code will be greatly appreciated.



Best regards,


    Luis


-----------------
Rob Bijman wrote:

> Dear ITK users,
> 
> I am working for the MST Hospital in the Netherlands and I am trying to 
> use ITK for a registration process. It's my job to develop a program 
> that notices movements of patients when they are being x-rayed.
> The problem is that the values I get from the transforms I use (Affine 
> Transform / Translation Transform) do not match with the theoretical 
> values when I use 'real' multicolor images. I used the ITK software 
> guide and have put the transforms inside the program exactly the way it 
> has been described. It only works when using example pictures from ITK 
> 1.6.0, and the rotation from the Affine Transform doesn't work at all 
> (very strange values). Does anyone have some extra documentation for me, 
> or some help?
> The second problem is the use of filters. When I put filters (for 
> example the binary tresholdfilter) into the program, like described in 
> the ITK software guide, the program runs normally, but when I start the 
> registration the program returns an error.
> It would be very nice if someone has got some extra information for 
> this. I hope that what I described above is clear enough.
> 
> With kind regards,
> 
> Rob Bijman
> MST Enschede, Netherlands
> 






More information about the Insight-users mailing list