[vtkusers] Help with blanket/surface plotting

Gerrick Bivins gbivins at objectreservoir.com
Tue Aug 26 13:15:22 EDT 2008


Did you specify scalar point or cell data? If so did you set one of the
arrays as the active scalar?
I think vtkWarpScalar prints that info out if it can¹t determine which
scalars to use.
Gerrick

On 8/26/08 11:26 AM, "James Dippner" <jdippner at informetric.com> wrote:

> Thanks for the reply.
> Yes, I did set the scale factor (ranging from 2.5 to 10) to no effect. I also
> tried setting the USeNormalsOn, and explicitly setting the Normal to (0,0,1).
> I'm thinking that my problem exists on the grid or geometry setup, but I'm
> still trying to get my head around the object model.
> 
> Gerrick Bivins wrote:
>>  
>> I know you may have done this but maybe not from the code snippet below.Did
>> you specify a scale factor for your warp?
>> 
>> 
>> On 8/26/08 11:01 AM, "James Dippner" <jdippner at informetric.com>
>> <mailto:jdippner at informetric.com>  wrote:
>> 
>>   
>>  
>>>  
>>> Let me start by saying that I am new to using vtk, as in I started
>>> working with the toolkit over the weekend ;)
>>> 
>>> I am trying to plot a simple 3d blanket/surface plot of data.  Combing
>>> through the examples, I put together a simple example that I thought
>>> would work, but I am apparently missing something.
>>> 
>>> I am working in C++, so I will spare you the detailed code, but a
>>> summary of the  pipleline is as follows:
>>> 
>>> x[10], y[5], z[50] ->
>>> vtkRectilinearGrid w/ dimensions (10,5,1) ->
>>> vtkRectilinearGridGeometryFilter w/ extent (0,9, 0,4, 0,49) ->
>>> vtkWarpScalar w/ XYPlaneOn ->
>>> vtkDataSetMapper ->
>>> vtkActor -> renderer
>>> 
>>> Despite much experimentation, my resulting plot is always a flat xy
>>> grid. Using the vtkRectilinearGrid::GetNumberOfPoints and
>>> vtkRectilinearGrid::GetNumberOfCells functions, I get the expected 36
>>> cells and 50 points.  With the vtkWarpScalar debugging on, I get the
>>> following message, "vtkWarpScalar (016C70D8): No data to warp".
>>> How do I warp the grid to show z as height?  Am I not using the right
>>> classes, or have I simply set the classes up wrong?
>>> 
>>> Any help or suggestions would be much appreciated.
>>> 
>>> Thanks,
>>> Jim
>>> 
>>>     
>>>  
>>  
>> 
>> 
>> 
>> 
>>   

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


More information about the vtkusers mailing list