ITK  4.8.0
Insight Segmentation and Registration Toolkit
SphinxExamples/src/Core/Common/ConceptCheckingIsSameType/Code.cxx
#include "itkImage.h"
template< typename TImage, class TValue >
void CheckIfPixelTypeIsTheSameAs( const TImage* const )
{
}
int main( int, char* [] )
{
const unsigned int Dimension = 2;
typedef unsigned char PixelType;
ImageType::Pointer image = ImageType::New();
CheckIfPixelTypeIsTheSameAs< ImageType, unsigned char >( image.GetPointer() );
CheckIfPixelTypeIsTheSameAs< ImageType, ImageType2::PixelType >( image.GetPointer() );
return EXIT_SUCCESS;
}