[Insight-users] itkConceptChecking.h
Brad King
brad.king at kitware.com
Tue Aug 10 22:34:18 EDT 2004
Jill Goldschneider 327 wrote:
> My filter is templated over input/output image types that
> must be in vector format, that is, each pixel is a vector.
> It is necessary that the input/output image dimensions be
> the same and that the length of vectors of the input/output
> pixels be the same. However, it isn't necessary to have
> the vector type be the same type, so I do not want to use
> Concept::SameType. I would like to use something like
> the existing Concept::SameDimension. This works:
[snip]
> itkConceptMacro(SameDimension,
> (Concept::SameDimension<InputImageDimension,OutputImageDimension>));
> And this is what I'd like to do (it won't compile - duplicate enum value
> for SameDimension)
[snip]
> itkConceptMacro(SameDimension,
> (Concept::SameDimension<InputImageVectorDimension,
> OutputImageVectorDimension>));
I'm guessing you are trying to put both of these concepts into the same
class template. The first argument to the macro is just a name for the
concept's constraint in your class template, so it must be unique. Try
changing the second one to this:
itkConceptMacro(SameVectorLength,
(Concept::SameDimension<InputImageVectorDimension,
OutputImageVectorDimension>));
-Brad
More information about the Insight-users
mailing list