flood_fill.h 729 B

1234567891011121314151617181920212223
  1. #ifndef IGL_FLOOD_FILL_H
  2. #define IGL_FLOOD_FILL_H
  3. #include "igl_inline.h"
  4. #include <Eigen/Core>
  5. namespace igl
  6. {
  7. // Given a 3D array with sparse non-nan (number?) data fill in the NaNs via
  8. // flood fill. This should ensure that, e.g., if data near 0 always has a band
  9. // (surface) of numbered and signed data, then components of nans will be
  10. // correctly signed.
  11. //
  12. // Inputs:
  13. // res 3-long list of dimensions of grid
  14. // S res(0)*res(1)*res(2) list of scalar values (with (many) nans), see
  15. // output
  16. // Outputs:
  17. // S flood fill data in place
  18. IGL_INLINE void flood_fill(const Eigen::RowVector3i& res, Eigen::VectorXd& S);
  19. }
  20. #ifndef IGL_STATIC_LIBRARY
  21. # include "flood_fill.cpp"
  22. #endif
  23. #endif