[vtkusers] How To Texture Map a patch with vtkGlobeSource

Aashish Chaudhary aashish.chaudhary at kitware.com
Thu Nov 4 11:57:57 EDT 2010


On Thu, Nov 4, 2010 at 11:51 AM, Joey Mukherjee <joeymu at gmail.com> wrote:

> On Thu, Nov 4, 2010 at 10:42 AM, Aashish Chaudhary <
> aashish.chaudhary at kitware.com> wrote:
>
>> Hi,
>>
>> On Thu, Nov 4, 2010 at 11:34 AM, Joey Mukherjee <joeymu at gmail.com> wrote:
>>
>>> Thanks for posting this example Aashish!
>>>
>>> I have some NetCDF data files that I would like to overlay over the Earth
>>> and be able to extract subsets from them and the like.  To get this same
>>> type of visualization, can I make use of the Geo classes?
>>
>>
>> Probably need more detail on exactly what you are trying to do but in
>> general you should be able to use Geo*  classes for the purpose above.
>>
>>
>>> Does the have to be a texture map or can I use any kind of regularized
>>> image data?
>>>
>>> Can you elaborate this?
>>
>
> I have some NetCDF files which are described as follows:
>
> netcdf test {
> dimensions:
>         x = 5760 ;
>         y = 2880 ;
> variables:
>         float x(x) ;
>                 x:long_name = "x" ;
>                 x:actual_range = 0., 360. ;
>         float y(y) ;
>                 y:long_name = "y" ;
>                 y:actual_range = -90., 90. ;
>         float z(y, x) ;
>                 z:long_name = "z" ;
>                 z:_FillValue = NaNf ;
>                 z:actual_range = -9.04707336425781, 10.6143484115601 ;
>
> // global attributes:
>                 :Conventions = "COARDS/CF-1.0" ;
>                 :GMT_version = "4.3.1 [64-bit]" ;
>                 :node_offset = 1 ;
>
> The X/Y are long/lat respectively, with the z being the scalar values.  I
> would like to overlay this file and others onto a globe and specify just
> portions of the map to view.  vtkNetCDFCFReader will output an image (I
> believe), but its the part of mapping it to the globe which gets me.  I
> can't just convert an image to a texture map, can I?
>
> Just like the example, you can use vtkTexture and call SetInput on it with
the vtkImageData (that s the output of the image reader).


> You can see that this is a pretty high resolution (5760x2880) dataset so
> I'd like to just look at portions of the dataset to save time.
>
> Sure.



> Thanks,
> Joey
>



-- 
| Aashish Chaudhary
| R&D Engineer
| Kitware Inc.
| www.kitware.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20101104/41cffd66/attachment.htm>


More information about the vtkusers mailing list