<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Hi Amy,</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;I'm getting the following error:&nbsp;</div><div><br></div><div><div><font class="Apple-style-span" face="Monaco" size="2"><span class="Apple-style-span" style="font-size: 10px;"><div>Object named: probe, could not find requested method: SetInputConnection</div><div>or the method was called with incorrect arguments.</div><div><br></div><div>Object named: probe, could not find requested method: SetInputConnection</div><div>or the method was called with incorrect arguments.</div><div><br></div><div>&nbsp;&nbsp; &nbsp;while executing</div><div>"probe SetInputConnection 0 elevationData"</div><div>&nbsp;&nbsp; &nbsp;(file "/Users/elvis/Project/C4I/Source/tcl/LewistownPA/TestSurfaceTopographyWithProjectedPath.tcl" line 174)</div><div><br></div></span></font></div><div><br></div><div>for the modified code:</div><div><br></div></div><div><div><font class="Apple-style-span" face="Monaco" size="2"><span class="Apple-style-span" style="font-size: 10px;"><div>vtkPolyData terrainPaths</div><div>&nbsp;&nbsp;terrainPaths SetPoints pts</div><div>&nbsp;&nbsp;terrainPaths SetLines lines</div><div><br></div><div># Use a probe filter to obtain elevation data from the reconstructed surface</div><div>vtkImageData elevationData</div><div>&nbsp;&nbsp;elevationData SetDimensions $XmaxR $YmaxR $ZmaxR</div><div><br></div><div>vtkProbeFilter probe&nbsp;</div><div>&nbsp;&nbsp;probe SetInputConnection 0 elevationData</div><div>&nbsp;&nbsp;probe SetSourceConnection [surface GetOutputPort]&nbsp;</div><div><br></div><div>vtkProjectedTerrainPath projectedPaths</div><div>&nbsp;&nbsp;projectedPaths SetInput terrainPaths</div><div>&nbsp;&nbsp;projectedPaths SetInputConnection 1 [probe GetOutput]</div><div>&nbsp;&nbsp;projectedPaths SetHeightOffset 25</div><div>&nbsp;&nbsp;projectedPaths SetHeightTolerance 5</div><div>&nbsp;&nbsp;projectedPaths SetProjectionModeToNonOccluded</div><div>&nbsp;&nbsp;projectedPaths SetProjectionModeToHug</div><div><br></div></span></font></div><div><br></div></div><div><br></div><div>Are you sure I'm setting it up correctly? I have an empty vtkImageData object. In the books they use a polygonal as the input for the probe, so I'm not clear as how to go about using vtkImageData as a probe.</div><div><br></div><div>The vtkProbeFilter::SetSourceConnection is wired to the output of vtkWrapScalar. I guess the vtkWrapScalar at this stage contains the modified scalar data, so it just needs to be copied to the vtkImageData.&nbsp;</div><div><br></div><div><br></div><div>Please help!</div><div><br></div><div>Best regards,</div><div><br></div><div>Elvis Dowson</div><div><br></div><div><br></div><br><div><div>On Nov 11, 2008, at 12:19 AM, Amy Squillacote wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Hi Elvis,<br><br>The code you wrote looks right to me. I don't know if this will make any difference, but have you tried using vtkAlgorithm's SetInputConnection method (that takes two parameters) instead of SetInput / SetSource in both the vtkProbeFilter and vtkProjectedTerrainPath? SetInput should be replaced by SetInputConnection 0..., and SetSource by SetInputConnection 1...<br><br>- Amy<br><br>Elvis Dowson wrote:<br><blockquote type="cite">Hi Amy,<br></blockquote><blockquote type="cite"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Is this the correct way to do it? I'm getting an interpreter error for vtkProjectTerrainPath::SetSource(vtkImageData* )<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">vtkPolyData terrainPaths<br></blockquote><blockquote type="cite"> &nbsp;terrainPaths SetPoints pts<br></blockquote><blockquote type="cite"> &nbsp;terrainPaths SetLines lines<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"># Use a probe filter to obtain elevation data from the reconstructed surface<br></blockquote><blockquote type="cite">vtkImageData elevationData<br></blockquote><blockquote type="cite"> &nbsp;elevationData SetDimensions $XmaxR $YmaxR $ZmaxR<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">vtkProbeFilter probe &nbsp;&nbsp;probe SetInput &nbsp;[surface GetOutput]<br></blockquote><blockquote type="cite"> &nbsp;probe SetSource elevationData<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">vtkProjectedTerrainPath projectedPaths<br></blockquote><blockquote type="cite"> &nbsp;projectedPaths SetInput terrainPaths<br></blockquote><blockquote type="cite"> &nbsp;projectedPaths SetSource [probe GetOutput]<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Best regards,<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Elvis Dowson<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">On Nov 10, 2008, at 10:21 PM, Elvis Dowson wrote:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><blockquote type="cite">Hi Amy,<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Could you please help me out by giving me a code fragment on how to achieve this? I have created an outline below. <br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">I've created a vtkImageData and set it's dimensions by reading the max extent of the original DEM file. I hope that is correct. Now vtkProjectedPath::SetSource(vtkImageData* ) expects a vtkImageData*, and I don't know how to pass the vtkImageData object called elevationData to this method. I have highlighted it in red below.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">I have put the wrap scalar code fragment below. Could you please help me with a code fragment to extract the vtkImageData from the wrap scalar output?<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"># Create a reader to read the unstructured grid data.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">vtkDataSetReader reader<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> &nbsp;&nbsp;&nbsp;reader SetFileName "SampleDEM.vtk"<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"># Get the physical xy extent of dataset<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">scan [[reader GetOutput] GetWholeExtent] "%d %d %d %d %d %d" XminR XmaxR YminR YmaxR ZminR ZmaxR<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">..<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"># Now warp the surface based on the scalar elevation values<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"># This creates the 3D mesh model of the terrain.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">vtkWarpScalar surface<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> &nbsp;surface SetInput [geom GetOutput]<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> &nbsp;surface SetScaleFactor 0.1; # $scale variable controls vertical exaggeration<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">....<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"># Use a probe filter to obtain elevation data from the reconstructed surface<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">vtkImageData elevationData<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> &nbsp;elevationData SetDimensions $XmaxR $YmaxR $ZmaxR<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">#vtkProbeFilter<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">vtkProjectedTerrainPath projectedPaths<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> &nbsp;projectedPaths SetInput terrainPaths<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> &nbsp;projectedPaths SetSource [elevationData]<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> &nbsp;projectedPaths SetHeightOffset 25<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> &nbsp;projectedPaths SetHeightTolerance 5<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> &nbsp;projectedPaths SetProjectionModeToNonOccluded<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> &nbsp;projectedPaths SetProjectionModeToHug<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Best regards,<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Elvis Dowson<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><br>-- <br>Amy Squillacote &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Phone: (256) 726-4839<br>Computer Scientist &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Fax: (256) 726-4806<br>CFD Research Corporation &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Web: <a href="http://www.cfdrc.com">http://www.cfdrc.com</a><br>215 Wynn Drive, Suite 501<br>Huntsville, AL &nbsp;35805<br><br><br></div></blockquote></div><br></body></html>