[vtkusers] get the point intensity?

Laurent Mundeleer lmundele at ulb.ac.be
Thu Jan 22 09:29:02 EST 2004


Hi Mathieu,

thanks for the answer. This is extremely slow? I'll try it, but I don't 
know another way to do what I need...
I only find :
float vtkImageData::GetScalarComponentAsFloat      (       int        x, 
int      y, int      z, int      component    )    
maybe it's because I use VTK 4.2.

I don't use vtkDICOMImageReader yet ( a parser DICOM is in development) 
so I know the GetOutput() stuff ;-) , but do we always have to call 
Update() on the reader before doing it?

thanks again,

Laurent

Mathieu Malaterre wrote:

> 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
>
>
>

-- 
********************************************
Laurent Mundeleer
Université Libre de Bruxelles (ULB)
Service des Systèmes Logiques et Numériques (SLN) CP165/57
50, Av. F.Roosevelt
1050 Bruxelles
Belgium
tel : ++32.2.650.22.97
fax : ++32.2.650.22.98
e-mail : lmundele at ulb.ac.be
********************************************





More information about the vtkusers mailing list