[Insight-users] PLEASE HELP! RescaleIntensityImageFilter and Non Scalar Images

John Eke johne at annidis.com
Thu Jun 5 14:45:40 EDT 2008


Hi,

Could someone please show me how to read use the 
RescaleIntensityImageFilter with RGB Images? When I set an RGB image 
type (of type itk::RGBPixel<short unsigned int>) as input, I get lots of 
very confusing errors upon initializing the object:

        const unsigned int Dimmension = 2;
        typedef itk::RGBPixel<short unsigned int>  InputPixelType;
        typedef itk::RGBPixel<unsigned char>  OutputPixelType;

        typedef itk::Image<InputPixelType,  Dimmension>   InputImageType;
        typedef itk::Image<OutputPixelType, Dimmension>   OutputImageType;

        typedef itk::ImageFileReader<InputImageType>  ReaderType;

        ReaderType::Pointer reader = ReaderType::New();

        reader->SetFileName(path.toStdString().c_str());
        typedef itk::RescaleIntensityImageFilter<InputImageType, 
OutputImageType> FilterType;
        FilterType::Pointer filter = FilterType::New();   //ERROR OCCURS 
HERE

What am I not doing right?

Thanks

John


More information about the Insight-users mailing list