[vtkusers] Problem getting correct results with vtkProjectedTerrainPath

Elvis Dowson elvis.dowson at mac.com
Thu Nov 13 13:46:30 EST 2008


Hi Amy,
                  As a test I tried displaying the contents of  
vtkImageData and it came up empty, from the probe filter, plus it gave  
an error saying that the extent specified was outside the actual whole  
extent.

ERROR: In /Users/elvis/Tool/vtk-5.x/src/VTK/Filtering/ 
vtkStreamingDemandDrivenPipeline.cxx, line 818
vtkStreamingDemandDrivenPipeline (0x6231b60): The update extent  
specified in the information for output port 0 on algorithm  
vtkTrivialProducer(0x6231820) is 0 325 0 465 0 0, which is outside the  
whole extent 0 325 0 465 0 -1.

Here is the test code snippet (origin set to 0, till someone helps me  
figure out how to get the extent from the data set reader) that I  
used, taking a suggestion from David Cole.

# Use a probe filter to obtain elevation data from the reconstructed  
surface
vtkImageData elevationData
   elevationData SetScalarTypeToUnsignedChar
   elevationData AllocateScalars
   [[elevationData GetPointData] GetScalars] SetName "blankScalars"
   elevationData SetDimensions $XmaxR $YmaxR $ZmaxR
   #elevationData SetOrigin $XminB $YminB $ZminB
   elevationData SetOrigin 0 0 0
   elevationData SetSpacing 1 1 1

vtkProbeFilter probe
   probe SetInputConnection 0 [elevationData GetProducerPort]
   probe SetInputConnection 1 [surface GetOutputPort]

vtkImageActor imageActor
   imageActor SetInput elevationData

Best regards,

Elvis Dowson


On Nov 13, 2008, at 10:38 PM, Elvis Dowson wrote:

> Hi Amy,
>                  What is the correct way to retrieve the bounds of  
> the dataset? I get the following error when I try to do this.
>
> # Get the physical xyz bounds of dataset
> scan [[reader GetOutput] GetBounds] "%d %d %d %d %d %d" XminB XmaxB  
> YminB YmaxB ZminB ZmaxB
> puts "Physical bounds of dataset: $XminB $XmaxB $YminB $YmaxB $ZminB  
> $ZmaxB"
>
> Error
> can't read "XmaxB": no such variable
> can't read "XmaxB": no such variable
>     while executing
> "puts "Physical bounds of dataset: $XminB $XmaxB $YminB $YmaxB  
> $ZminB $ZmaxB""
>     (file "/Users/elvis/Project/C4I/Source/tcl/ 
> TestProjectedTerrainPathWithProbeFilter.tcl" line 28)
>
>
> Best regards,
>
> Elvis Dowson
>
> On Nov 13, 2008, at 10:24 PM, Amy Squillacote wrote:
>
>> Don't know if this will fix the problem, but I just noticed that  
>> XminR, XmaxR, etc. are from the extents of the dataset. The origin  
>> should be set using the Xmin, Ymin,  and Zmin of the bounds.
>>
>> - Amy
>>

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


More information about the vtkusers mailing list