[vtkusers] get the point intensity?

Mathieu Malaterre mathieu.malaterre at kitware.com
Thu Jan 22 09:19:42 EST 2004


Laurent Mundeleer wrote:
> Hi all,
> with FindPoint() I can have the point ID, but how can I have the 
> intensity of the point?
> It seems to me as a silly question but I can't find the function.
> I use DICOM images, who are displayed allright.

Laurent,

	You can use:

  double vtkImageData::GetScalarComponentAsDouble  	(   	int   	 x, 
int  	y, int  	z, int  	component	)  	

http://www.vtk.org/doc/nightly/html/classvtkImageData.html#z362_0

But you shouldn't be using this method as this is extremely slow.

Now let's try to anticipate the next comming questions ;)

Q: There is no such method in vtkDICOMImageReader
A: You need to call reader->GetOutput() (you'll get a vtkImageData*)

Q: I call GetOutput() but the intensity is completely wrong ?
A: You need to call Update() on the reader.


HTH,
Mathieu





More information about the vtkusers mailing list