<br><br><div class="gmail_quote">On Thu, Nov 4, 2010 at 5:15 PM, Joey Mukherjee <span dir="ltr"><<a href="mailto:joeymu@gmail.com">joeymu@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Now I remember why this doesn't work. When you have a texture, it<br>
must just be a flat image, right? You can't add any relief (i.e.<br>
vtkWarpScalar) to make it look different? Passing the output of<br>
vtkWarpScalar doesn't seem to work.<br></blockquote><div><br></div><div>Correct, a texture in general is a flat image. What you can do easily is to use two textures: </div><div><br></div><div>1. height map texture (for warping)</div>
<div>2. decal texture (for coloring). </div><div><br></div><div>Now not sure if you are familiar with shaders but what would I do is the pass these two the shader's and use height map texture to warp the globe geometry (move the vertices) </div>
<div>and other to color the fragments in the fragment shader.</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><br>
Its amazingly fast to plot this data as a texture instead of trying to<br>
plot it as an image.<br>
<br>
Also, to get this to work, I had to make the lat/long range go from<br>
-180 to 180 and -90 to 90 since that is what my image is. I realize<br>
in Donny's original example, he already had the USA image and just<br>
want to map that part. I thought he was digging into a larger<br>
dataset.<br></blockquote><div> </div><div>So basically you were using the entire globe right? </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
If I just wanted to show a certain region specified by a given<br>
lat/long range, would any of the vtkGeo stuff be able to help me? I'm<br>
ideally interested in viewing the data at the polar regions.<br>
<br></blockquote><div>It should if not let me know. </div><div><br></div><div>Thanks,</div><div> </div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Thank you for this!<br>
Joey<br>
<br>
On Thu, Nov 4, 2010 at 10:57 AM, Aashish Chaudhary<br>
<div><div></div><div class="h5"><<a href="mailto:aashish.chaudhary@kitware.com">aashish.chaudhary@kitware.com</a>> wrote:<br>
><br>
><br>
> On Thu, Nov 4, 2010 at 11:51 AM, Joey Mukherjee <<a href="mailto:joeymu@gmail.com">joeymu@gmail.com</a>> wrote:<br>
>><br>
>> On Thu, Nov 4, 2010 at 10:42 AM, Aashish Chaudhary<br>
>> <<a href="mailto:aashish.chaudhary@kitware.com">aashish.chaudhary@kitware.com</a>> wrote:<br>
>>><br>
>>> Hi,<br>
>>><br>
>>> On Thu, Nov 4, 2010 at 11:34 AM, Joey Mukherjee <<a href="mailto:joeymu@gmail.com">joeymu@gmail.com</a>> wrote:<br>
>>>><br>
>>>> Thanks for posting this example Aashish!<br>
>>>><br>
>>>> I have some NetCDF data files that I would like to overlay over the<br>
>>>> Earth and be able to extract subsets from them and the like. To get this<br>
>>>> same type of visualization, can I make use of the Geo classes?<br>
>>><br>
>>> Probably need more detail on exactly what you are trying to do but in<br>
>>> general you should be able to use Geo* classes for the purpose above.<br>
>>><br>
>>>><br>
>>>> Does the have to be a texture map or can I use any kind of regularized<br>
>>>> image data?<br>
>>><br>
>>> Can you elaborate this?<br>
>><br>
>> I have some NetCDF files which are described as follows:<br>
>> netcdf test {<br>
>> dimensions:<br>
>> x = 5760 ;<br>
>> y = 2880 ;<br>
>> variables:<br>
>> float x(x) ;<br>
>> x:long_name = "x" ;<br>
>> x:actual_range = 0., 360. ;<br>
>> float y(y) ;<br>
>> y:long_name = "y" ;<br>
>> y:actual_range = -90., 90. ;<br>
>> float z(y, x) ;<br>
>> z:long_name = "z" ;<br>
>> z:_FillValue = NaNf ;<br>
>> z:actual_range = -9.04707336425781, 10.6143484115601 ;<br>
>> // global attributes:<br>
>> :Conventions = "COARDS/CF-1.0" ;<br>
>> :GMT_version = "4.3.1 [64-bit]" ;<br>
>> :node_offset = 1 ;<br>
>> The X/Y are long/lat respectively, with the z being the scalar values. I<br>
>> would like to overlay this file and others onto a globe and specify just<br>
>> portions of the map to view. vtkNetCDFCFReader will output an image (I<br>
>> believe), but its the part of mapping it to the globe which gets me. I<br>
>> can't just convert an image to a texture map, can I?<br>
><br>
> Just like the example, you can use vtkTexture and call SetInput on it with<br>
> the vtkImageData (that s the output of the image reader).<br>
><br>
>><br>
>> You can see that this is a pretty high resolution (5760x2880) dataset so<br>
>> I'd like to just look at portions of the dataset to save time.<br>
><br>
> Sure.<br>
><br>
><br>
>><br>
>> Thanks,<br>
>> Joey<br>
><br>
><br>
> --<br>
> | Aashish Chaudhary<br>
> | R&D Engineer<br>
> | Kitware Inc.<br>
> | <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>| Aashish Chaudhary <br>| R&D Engineer <br>| Kitware Inc. <br>| <a href="http://www.kitware.com">www.kitware.com</a> <br>