[vtkusers] 3D .raw data density values

Michael Knopke Michael.Knopke at gmx.de
Tue Mar 13 11:08:09 EDT 2007


Hi Tony,

 

probing just a point is quite straightforward.

 

Here is how I do it:

 

- feed Imagedata into vtkImageReslice render it with vtkImageViewer2 (as
texture)

- create a vtkPointWidget in that window

- create polydata (point)

- use vtkPointWidget->GetPolyData(point)

 

Now connect the ImageData (SetSource) to vtkProbeFilter and the point
(SetInput)

 

-          now you can query the output for scalardata:

 

ProbeFilter->GetOutput()->->GetPointData()->GetScalars()->GetRange(range,0);
//this is the scalardata, there is probably another way to get the value

 

-          to define the right position of the point widget use
vtkImageActorPointPlacer:

 

 

   image_PointPlacer->SetImageActor(ImageActor);

   image_PointPlacer->ComputeWorldPosition(Renderer, displayPos, worldPos,
worldOrient);

 

   point_Widget->SetPosition(worldPos[0],worldPos[1], 1);

 

-          now the only thing that you need to do is updating the probe
while using the widget: just add an observer for this  

 

you can set the interpolation type in the class
vtkImageReslice->SetInterpolationTypeTo.

 

If you have problems with this pipeline read the corresponding examples to
every involved class first

 

Regards

 

Michael

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20070313/b2b42b1b/attachment.htm>


More information about the vtkusers mailing list