Sat Jul 04, 2015 2:23 pm
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;
}
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com
Powered by phpBB © phpBB Group.