NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.
To learn about what's going on, see About the Archive Site.
Hi,
Just a note: please refer to the tutorial, section 6.5 onwards for some examples on how to use resample. Although it's done there with a line and a grid, as Bill points out, you can use any Set. For example,Is there a way in VisAD to resample a grid to make it cubic? I have learned that arithmetic operations on images will be resampled if the grids don't match but is there a way to resample at the flat-field level? Tha is, I have a 32x32x16 grid (actually a flat field)--is there anything in the VisAD API to convert this to a 32x32x32. I've started writing the code to do this but thought I might as well ask before I get to far in. Thanks!Please don't write code. Instead use the FlatField.resample() method. It is very general, and has many thousands of lines of code behind it (resample from any sampling Set to any sampling Set, by nearest neighbor or weighted average, possibly propagating error estimates, doing implicit Unit converstions and CoordinateSystem transforms as needed, etc).
new_32x32x32:flat_field = old_32x32x16_flat_field.resample( dummy_32x32x32_set );
Cheers, Ugo
visad
archives: