[vtkusers] vtkProbeFilter misses some data points and adds others

Philip Morris Jones philip at cd.co.uk
Wed Oct 9 07:54:11 EDT 2002


Hi

I have results on an unstructured grid and am trying to present them in a
uniform manner. To do this I have created a plane source and am trying to
map the results on using vtkProbeFilter:

 vtkPlaneSource *plane = vtkPlaneSource::New();
 plane->SetOrigin(0.,-.05,-0.01);
 plane->SetPoint1(0.,0.05,-0.01);
 plane->SetPoint2(0.,-.05, 0.11);
 plane->SetXResolution(10);
 plane->SetYResolution(10);

 vtkProbeFilter *probe = vtkProbeFilter::New();
 probe->SetInput(plane->GetOutput() );
 probe->SetSource(uns );
 vtkGlyph3D *glyphu = vtkGlyph3D::New();
 glyphu->SetSource(line->GetOutput());
 glyphu->SetScaleModeToScaleByVector();
 glyphu->SetColorModeToColorByScalar();
 glyphu->SetInput(probe->GetOutput());
 vtkIdTypeArray *valid = vtkIdTypeArray::New();
 valid=probe->GetValidPoints();
 vtkPolyDataMapper* regMapper = vtkPolyDataMapper::New();
 regMapper->SetInput ( glyphu->GetOutput() );
 regMapper->SetScalarRange ( scmin,scmax );
 regMapper->SetLookupTable ( lut );

 probe->Update();

 ofstream file;
 file.open("c:\\log");
 valid->Print(file);

 for(int index=0;index<=(valid->GetMaxId());index++) file <<
valid->GetValue(index) << "\n";
 file.close();


My plane is bigger than my domain so I expect unused values and am using the
GetValidPoints to see what lies in and what is outside. If I look at my log:

vtkIdTypeArray (0x07A0A598)
  Debug: Off
  Modified Time: 801
vtkIdTypeArray (0x07B067F8)
  Debug: Off
  Modified Time: 9202
  Reference Count: 1
  Registered Events: (none)
  Name: (none)
  Number Of Components: 1
  Number Of Tuples: 44
  Size: 121
  MaxId: 43
  LookupTable: (none)
  Array: 0x07A27C40

14
15
17
18
25
26
27
28
29
36
37
38
39
40
47
48
49
50
51
58
59
60
61
62
69
70
71
72
73
80
81
82
83
84
91
92
93
94
95
102
103
104
105
106


I see I have 44 points and the pattern is odd, where is 16? The plot shows a
missing vector where I expect one.

Does anybody have an idea what is happening?

Thanks

Philip



-------------- next part --------------
A non-text attachment was scrubbed...
Name: missingvect.gif
Type: image/gif
Size: 6111 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20021009/6923c419/attachment.gif>


More information about the vtkusers mailing list