[Insight-users] Warping a color image (RGB)

Wouter Lindhoud w.m.lindhoud at gmail.com
Fri Jul 20 06:33:11 EDT 2007


Hi all,

I'm trying to adapt "LandmarkWarping2.cxx" to cope with RBG images (on
works great on grey scale images of type unsigned char).  I was
wondering if anybody knows how to do that?

The following lines do not compile:

>>
#include "itkDeformationFieldSource.h"
#include "itkWarpImageFilter.h"
#include "itkRGBPixel.h"

typedef itk::RGBPixel<unsigned char > InternalPixelType;
typedef itk::Image< InternalPixelType, 2 > ImageType;

typedef itk::LinearInterpolateImageFunction< ImageType, double >
InterpolatorType;
<<

Is it a silly mistake because I lack template knowledge? Or should I
warp each of the three RGB channels separately?"

cheers,
Wouter Lindhoud


More information about the Insight-users mailing list