[vtkusers] How to import NASA SRTM DEM data into VTK
Elvis Dowson
elvis.dowson at mac.com
Mon Oct 13 09:51:36 EDT 2008
Hi Matieu,
When I set the data extent as follows:
reader SetDataExtent 0 1200 0 1200 0 0
I get the following error.
File operation failed. row = 600, Read = 4804, FilePos = -1
The image is partially reconstructed, with a really big black border
around, with a central white patch, with some faint traces of some
sort of relief shading.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: STRM Data Import.png
Type: image/png
Size: 17031 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20081013/9c539e63/attachment.png>
-------------- next part --------------
What could be wrong and causing this read error?
Best regards,
Elvis Dowson
On Oct 13, 2008, at 5:38 PM, Mathieu Malaterre wrote:
> On Mon, Oct 13, 2008 at 3:32 PM, Michael Jackson
> <mike.jackson at bluequartz.net> wrote:
>> http://www.vtk.org/doc/release/5.2/html/a00665.html#b853fba8decf9550e4678fa4f4ca9ad0
>>
>> Page 405 in the 4th edition of the "Visualization Toolkit" explains
>> what the
>> data extents are.
>>
>> Basically they are the min/max (in x,y,z) of your data. For example
>> if your
>> data was 100x 50 x10 but the actual minimum value was 1000, 1000,
>> 1000 (x,
>> y, z) then your data extents would be 1000, 1101, 1000, 1051, 1000,
>> 1011
>> (Xmin, Xmax, Ymin, Ymax, Zmin, Zmax).
>
> As I said in my previous email, if your data is 512x512x1, VTK
> dimension is (512, 512, 1) BUT data extent is: (0, 511, 0, 511, 0, 0)
>
> Elvis,
>
> you are off by one, AFAIK.
>
> reader SetDataExtent 0 1200 0 1200 0 0
>
> 2cts
> --
> Mathieu
More information about the vtkusers
mailing list