[Insight-users] MaskImageFilter with VectorImage

David Doria daviddoria at gmail.com
Sun Apr 3 12:43:55 EDT 2011

When trying to compile this:

#include "itkVectorImage.h"
#include "itkMaskImageFilter.h"

typedef itk::VectorImage<unsigned char, 2>  VectorImageType;
typedef itk::Image<unsigned char, 2>  MaskImageType;

int main(int argc, char *argv[])
  typedef itk::MaskImageFilter< VectorImageType, MaskImageType > MaskFilterType;
  MaskFilterType::Pointer maskFilter = MaskFilterType::New();

  return EXIT_SUCCESS;

I get
itkMaskImageFilter.h:60: error: invalid conversion from ‘const
itk::VariableLengthVector<unsigned char> (*)(const
itk::VariableLengthVector<unsigned char>&)’ to ‘unsigned int’
itkMaskImageFilter.h:60: error:   initializing argument 1 of
int) [with TValueType = unsigned char]’

Is there any reason a VectorImage cannot be masked?



More information about the Insight-users mailing list