[Insight-users] Registration on RGB images

Luis Ibanez luis.ibanez at kitware.com
Fri Dec 3 17:31:15 EST 2004


Hi Muhamad,

Are your input images (Fixed and Moving) also RGB images ?

If so, you will have to define a Metric for comparing both
images. Most ITK metrics work on Scalar images.

In order to get scalar images out of your input RGB images you
could extract the red channel, or convert them to Luminance.

Filters are available in ITK for both conversions.

e.g. for Luminance:
http://www.itk.org/Insight/Doxygen/html/classitk_1_1RGBToLuminanceImageFilter.html

for Channel extraction you will find details in the ImageAdaptors
chapter in the ITK Software Guide

      http://www.itk.org/ItkSoftwareGuide.pdf



Once you finish the registration, you can use the
VectorResampleImageFilter

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

in order to resample in the input RGB image and generate
an RGB image as output.



Please give us more details regarding the application that you
are dealing with.


    Thanks



        Luis



----------------------
Muhamad Amine wrote:

> Hi,
>  
> What's the easiest way to run a registration example and have it output 
> an RGB image rather than a BW image. I'm interested in running the 
> MultiResImageRegistration1 and have it produce a color image. I tried 
> changing the PixelType to itk::RGBPixel< unsigned char > and I'm running 
> into compiling errors.
>  
> If there is a simple example someone can point me to that would be fine.
>  
> thanks
>  
> ~ma
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users




More information about the Insight-users mailing list