typedef float OutputPixelType;typedef itk::Image< OutputPixelType, 2 > OutputImageType;void ClassName::printImagePixel2D(int x,int y, OutputImageType::Pointer image){ // Access to a pixel OutputImageType::IndexType pixelIndex; pixelIndex[0] =x; pixelIndex[1] =y; OutputImageType::PixelType pixelValue = image->GetPixel(pixelIndex); std::cout << "pixel : " << pixelValue << std::endl; }