MultiArrayLayout.msg 911 B

1234567891011121314151617181920212223242526
  1. # The multiarray declares a generic multi-dimensional array of a
  2. # particular data type. Dimensions are ordered from outer most
  3. # to inner most.
  4. MultiArrayDimension[] dim # Array of dimension properties
  5. uint32 data_offset # padding elements at front of data
  6. # Accessors should ALWAYS be written in terms of dimension stride
  7. # and specified outer-most dimension first.
  8. #
  9. # multiarray(i,j,k) = data[data_offset + dim_stride[1]*i + dim_stride[2]*j + k]
  10. #
  11. # A standard, 3-channel 640x480 image with interleaved color channels
  12. # would be specified as:
  13. #
  14. # dim[0].label = "height"
  15. # dim[0].size = 480
  16. # dim[0].stride = 3*640*480 = 921600 (note dim[0] stride is just size of image)
  17. # dim[1].label = "width"
  18. # dim[1].size = 640
  19. # dim[1].stride = 3*640 = 1920
  20. # dim[2].label = "channel"
  21. # dim[2].size = 3
  22. # dim[2].stride = 3
  23. #
  24. # multiarray(i,j,k) refers to the ith row, jth column, and kth channel.