Re: Volume visualization strangeness

 Hi,

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).

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,

new_32x32x32:flat_field = old_32x32x16_flat_field.resample( dummy_32x32x32_set );

Cheers,

Ugo


  • 2003 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the visad archives: