From Ohm

ITK Pixel Getter

Or get the center pixel value:

// get center value
Image3DType::IndexType index;
index[0] = (size[0]-1)/2;
index[1] = (size[1]-1)/2;
index[2] = (size[2]-1)/2;
Image3DType::PixelType value = image->GetPixel(index);

// print center value
std::cout << "center=" << value << std::endl;

Retrieved from http://schorsch.efi.fh-nuernberg.de/roettger/index.php/MedicalVisualization/ITKPixelGetter

Page last modified on December 10, 2013, at 03:54 PM