[vtkusers] How to import NASA SRTM DEM data into VTK

Elvis Dowson elvis.dowson at mac.com
Mon Oct 13 09:16:38 EDT 2008


Thanks, once again Mike! I'll take a look at your example.

Any idea how I can set vtkImageReader2 to read in 1201x1201 array of  
data elements from the NASA SRTM *.hgt file? The file has no header or  
trailer. All the elevation data is stored as 16-bit signed integers.

I think the SRTM raw data should be in a format that vtkImageReader2  
can read into to create a vtkImageData object that I can subsequently  
use for creating a 3D terrain surface.

Once I've got that working, I could wrap the functionality into a  
vtkSRTMReader class. I've already got the skeleton outline for the  
class, but I'm still struggling with implementing the raster image  
reading functionality.

Best regards,

Elvis

On Oct 13, 2008, at 5:07 PM, Michael Jackson wrote:

> Actually you will want to over ride RequestInformation and  
> RequestData() methods. The other 2 methods I think were for the  
> older 4.x pipeline and are there for historic reasons... I think.
>
> RequestInformation and RequestData are the correct methods to over  
> ride.
>
>
> Take a look at:
>
> http://www.bluequartz.net/viewvc/CTMD/PVPhaseField/src/Readers/
>
> vtkH5PhaseFieldReader for an example reader.
>
> _



More information about the vtkusers mailing list