[Insight-users] CastImageFilter error
akbarjan bayiz
abayiz at yahoo.com
Sun Mar 20 15:40:01 EDT 2011
Hello all!
I am trying to convert data from one type to another using following lines in ITK:
********************************
const unsigned int Dimension = 3;
typedef itk::Image< float, 3 > ImageType;
typedef itk::VTKImageToImageFilter<ImageType> VTKImageToImageType;
VTKImageToImageType::Pointer reader = VTKImageToImageType::New();
...
........................
typedef float InternalPixelType;
typedef itk::Image< InternalPixelType, Dimension > InternalImageType;
typedef itk::CastImageFilter< FixedImageType, InternalImageType > CasterType;
CasterType::Pointer Caster = CasterType::New();
Caster->SetInput( reader->GetOutput() );
****************
And it gives out the following error message:
"no matching function for call to ‘itk::CastImageFilter<itk::Image<short unsigned int, 3u>, itk::Image<float, 3u> >::SetInput(const itk::Image<float, 3u>*) "
I have been working for this for about one week, and cannot figure it out yet. I really hope someone could help me... many warm thanks in advance!
More information about the Insight-users
mailing list