[Insight-users] Re: [vtkusers] 3D .raw data density values

tony hakki tony2007vtk at yahoo.com
Wed Mar 14 14:54:13 EST 2007


hi all;
I have 


Assuming that Pi(xi,yi,zi) is a position on the surface of a dataset and Ni(xi,yi,zi) is the normal calculated from the point Pi using the that
dataset, I will calculate 50 samples in the positive direction and 50 samples in the negative direction for each point on the that datasets.I will calculate samples in the positive direction using:
+ direction :P1=Pi+Ni, P2=P1+Ni,P3=P2+Ni...
and in the negative direction using:
- direction: P1=Pi-Ni, P2=P1-Ni, P3=P2-Ni... so on
Assuming that I got the whole sample points.
The grey value for all of these points (P1, P2, P3 ...) will be retrieved
from the raw dataset after doing trilinear interpolation. could ProbeFilter able to achieve this? 

Thanks alot 
Tony

 
----- Original Message ----
From: Michael Knopke <Michael.Knopke at gmx.de>
To: vtkusers at vtk.org
Sent: Tuesday, March 13, 2007 4:08:09 PM
Subject: [vtkusers] 3D .raw data density values


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
_______________________________________________
This is the private VTK discussion list. 
Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers


 
____________________________________________________________________________________
Finding fabulous fares is fun.  
Let Yahoo! FareChase search your favorite travel sites to find flight and hotel bargains.
http://farechase.yahoo.com/promo-generic-14795097
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20070314/ad16753d/attachment.htm


More information about the Insight-users mailing list