[Insight-users] CastImageFilter error

Dan Mueller dan.muel at gmail.com
Mon Mar 21 01:13:45 EDT 2011


Hi,

We miss the definition of FixedImageType in your mail. Is
FixedImageType the same as VTKImageToImageType?

I recommend sending to the mailing list a minimal example (complete
source code which isolates the problem and CMakeLists.txt). I figure
in your case a minimal example should be 10-15 lines of code. Doing so
will help those on the mailing list reproduce your issue with the
least amount of effort.

Regards, Dan

On 20 March 2011 20:40, akbarjan bayiz <abayiz at yahoo.com> wrote:
> 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!
>
>
>
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>


More information about the Insight-users mailing list