MedicalVisualization

ITK Pixel Getter

ITK Image Size | | Dicom Series Loader with ITK

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;


ITK Image Size | | Dicom Series Loader with ITK

Options: