[vtkusers] How to import NASA SRTM DEM data into VTK
Elvis Dowson
elvis.dowson at mac.com
Sun Oct 12 18:04:52 EDT 2008
Hi,
Looking at the list of VTK classes, I think that
vtkImageReader2 could be used to read the SRTM DEM data file, with
byte swapping on. A vtkImageData object is obtained from
vtkImageAlgorithm::GetOutput(), which is a superclass of
vtkImageReader2.
One thing I am not so sure of is what I should do about the following
vtkImageReader2 methods
SetDataExtent (int, int, int, int, int, int)
SetDataSpacing (double, double, double)
SetDataOrigin (double, double, double)
If the value in SRTM array data position [0][0] = +100, then do I
store this at the following coordinate location x=0, y=0, z=+100 ? Is
this correct? That is, the first element is stored at the lower left
cornet and the z value is interpreted as a scalar value for the height
field? Is this how it works when reading DEM files, and what
vtkDEMReader does?
Best regards,
Elvis Dowson
>
> In essence, SRTM data is nothing but raster data, stored using 16-
> bit signed integer. Depending upon the arc length, you will have
> either 1201x1201 or 3601x3601 data elements. So, all I have to do is
> to import each value, taking take to perform byte swapping, since I
> am using a Mac Book Pro with an Intel processor, and read in two
> bytes of data, corresponding to a pixel element value, that can
> later be used to create a raster image of height field data.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20081013/d1ab30ea/attachment.htm>
More information about the vtkusers
mailing list