[vtkusers] Access and alter point data

Michnay Balázs michnay at freemail.hu
Tue Dec 21 10:46:41 EST 2004


Dear VTK Users,
I'd like to read the point values of a grayscale image (0..255). My code 
does not work...

vtkPoints *newPts = vtkPoints::New();
newPts->SetNumberOfPoints(numPts);

float x[3];

for (int i=0; i<numPts; i++){
pDoc->MainImageContainer[m_lastsel].threshImage->GetPoint(i,x);

//GetPoint returns some kind of coordinate values, not the 
actual "value" (0.255) of the pixel.
		
}

Please let me know how to do this.
Thanks,

  MB



More information about the vtkusers mailing list